GLib.uri_parse_scheme

function uri_parse_scheme(uri: String): String {
    // Gjs wrapper for g_uri_parse_scheme()
}
  

Gets the scheme portion of a URI string. RFC 3986 decodes the scheme as: |[ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] ]| Common schemes include "file", "http", "svn+ssh", etc.

Since 2.16

uri

a valid URI.

Returns

The "Scheme" component of the URI, or null on error. The returned string should be freed when no longer needed.