[][src]Function libcoap_sys::coap_split_path

pub unsafe extern "C" fn coap_split_path(
    s: *const u8,
    length: usize,
    buf: *mut c_uchar,
    buflen: *mut usize
) -> c_int

Splits the given URI path into segments. Each segment is preceded by an option pseudo-header with delta-value 0 and the actual length of the respective segment after percent-decoding.

@param s The path string to split. @param length The actual length of @p s. @param buf Result buffer for parsed segments. @param buflen Maximum length of @p buf. Will be set to the actual number of bytes written into buf on success.

@return The number of segments created or @c -1 on error.