[−][src]Function libcoap_sys::coap_split_query
pub unsafe extern "C" fn coap_split_query(
s: *const u8,
length: usize,
buf: *mut c_uchar,
buflen: *mut usize
) -> c_int
Splits the given URI query into segments. Each segment is preceded by an option pseudo-header with delta-value 0 and the actual length of the respective query term.
@param s The query 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.
@bug This function does not reserve additional space for delta > 12.