The OpenD Programming Language

std.uri

Encode and decode Uniform Resource Identifiers (URIs). URIs are used in internet transfer protocols. Valid URI characters consist of letters, digits, and the characters ;/?:@&=+$,-_.!~*'() Reserved URI characters are ;/?:@&=+$, Escape sequences consist of % followed by two hex digits.

Members

Classes

URIException
class URIException

This Exception is thrown if something goes wrong when encoding or decoding a URI.

Functions

decode
string decode(const(Char)[] encodedURI)

Decodes the URI string encodedURI into a UTF-8 string and returns it. Escape sequences that resolve to reserved URI characters are not replaced. Escape sequences that resolve to the '#' character are not replaced.

decodeComponent
string decodeComponent(const(Char)[] encodedURIComponent)

Decodes the URI string encodedURI into a UTF-8 string and returns it. All escape sequences are decoded.

emailLength
ptrdiff_t emailLength(const(Char)[] s)

Does string s[] start with an email address?

encode
string encode(const(Char)[] uri)

Encodes the UTF-8 string uri into a URI and returns that URI. Any character not a valid URI character is escaped. The '#' character is not escaped.

encodeComponent
string encodeComponent(const(Char)[] uriComponent)

Encodes the UTF-8 string uriComponent into a URI and returns that URI. Any character not a letter, digit, or one of -_.!~*'() is escaped.

uriLength
ptrdiff_t uriLength(const(Char)[] s)

Does string s[] start with a URL?

See Also

Meta