View source code Display the source code in std/uri.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Module 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.

See Also

RFC 3986
Wikipedia

Functions

Name Description
decode 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 Decodes the URI string encodedURI into a UTF-8 string and returns it. All escape sequences are decoded.
emailLength Does string s[] start with an email address?
encode 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 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 Does string s[] start with a URL?

Classes

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

Authors

Walter Bright

License

Boost License 1.0.

Comments