Function

GLib-2.0GLiburi_splitSince 2.66

  • Parses uri_ref (which can be an absolute or relative URI) according to flags, and returns the pieces. Any component that doesn't appear in uri_ref will be returned as null (but note that all URIs always have a path component, though it may be the empty string).

    If flags contains GLib.UriFlags.ENCODED, then %-encoded characters in uri_ref will remain encoded in the output strings. (If not, then all such characters will be decoded.) Note that decoding will only work if the URI components are ASCII or UTF-8, so you will need to use GLib.UriFlags.ENCODED if they are not.

    Note that the GLib.UriFlags.HAS_PASSWORD and GLib.UriFlags.HAS_AUTH_PARAMS flags are ignored by g_uri_split(), since it always returns only the full userinfo; use g_uri_split_with_user() if you want it split up.

    Parameters

    • uri_ref: string

      a string containing a relative or absolute URI

    • flags: GLib.UriFlags

      flags for parsing uri_ref

    Returns [boolean, string, string, string, number, string, string, string]

    true if uri_ref parsed successfully, false on error.

    2.66