Function gnunet_sys::GNUNET_STRINGS_parse_uri[][src]

pub unsafe extern "C" fn GNUNET_STRINGS_parse_uri(
    path: *const c_char,
    scheme_part: *mut *mut c_char,
    path_part: *mut *const c_char
) -> c_int

Parse a path that might be an URI.

@param path path to parse. Must be NULL-terminated. @param[out] scheme_part pointer to a string that represents the URI scheme will be stored. Can be NULL. The string is allocated by the function, and should be freed by GNUNET_free() when it is no longer needed. @param path_part a pointer to ‘const char ’ where a pointer to the path part of the URI will be stored. Can be NULL. Points to the same block of memory as @a path, and thus must not be freed. Might point to ‘\0’, if path part is zero-length. @return #GNUNET_YES if it’s an URI, #GNUNET_NO otherwise. If ‘path’ is not an URI, ‘ scheme_part’ and ‘*path_part’ will remain unchanged (if they weren’t NULL).