URI

Functions for manipulating Universal Resource Identifiers (URIs) as defined by RFC 3986. It is highly recommended that you have read and understand RFC 3986 for understanding this API.

Members

Static functions

escapeString
string escapeString(string unescaped, string reservedCharsAllowed, int allowUtf8)

Escapes a string for use in a URI. Normally all characters that are not "unreserved" (i.e. ASCII alphanumerical characters plus dash, dot, underscore and tilde) are escaped. But if you specify characters in reserved_chars_allowed they are not escaped. This is useful for the "reserved" characters in the URI specification, since those are allowed unescaped in some portions of a URI. Since 2.16

gFilenameFromUri
string gFilenameFromUri(string uri, string hostname)

Converts an escaped ASCII-encoded URI to a local filename in the encoding used for filenames.

gFilenameToUri
string gFilenameToUri(string filename, string hostname)

Converts an absolute filename to an escaped ASCII-encoded URI, with the path component following Section 3.3. of RFC 2396.

listExtractUris
string[] listExtractUris(string uriList)

Splits an URI list conforming to the text/uri-list mime type defined in RFC 2483 into individual URIs, discarding any comments. The URIs are not validated. Since 2.6

parseScheme
string parseScheme(string uri)

Since 2.16

unescapeSegment
string unescapeSegment(string escapedString, string escapedStringEnd, string illegalCharacters)

Unescapes a segment of an escaped string. If any of the characters in illegal_characters or the character zero appears as an escaped character in escaped_string then that is an error and NULL will be returned. This is useful it you want to avoid for instance having a slash being expanded in an escaped path element, which might confuse pathname handling. Since 2.16

unescapeString
string unescapeString(string escapedString, string illegalCharacters)

Unescapes a whole escaped string. If any of the characters in illegal_characters or the character zero appears as an escaped character in escaped_string then that is an error and NULL will be returned. This is useful it you want to avoid for instance having a slash being expanded in an escaped path element, which might confuse pathname handling. Since 2.16

Meta