arsd.uri

Future public interface to the Uri struct and encode/decode component functions.

Members

Functions

decodeVariables
string[][string] decodeVariables(string data, string separator, string[]* namesInOrder, string[]* valuesInOrder)

breaks down a url encoded string

decodeVariablesSingle
string[string] decodeVariablesSingle(string data)

breaks down a url encoded string, but only returns the last value of any array

encodeVariables
string encodeVariables(string[string] data)

url encodes the whole string

encodeVariables
string encodeVariables(string[][string] data)

url encodes a whole string

makeDataUrl
string makeDataUrl(string mimeType, void[] data)

Makes a data:// uri that can be used as links in most newer browsers (IE8+).

rawurlencode
string rawurlencode(char[] data)

Encodes all but the explicitly unreserved characters per rfc 3986 Alphanumeric and -_.~ are the only ones left unencoded name is borrowed from php

Structs

Uri
struct Uri

Represents a URI. It offers named access to the components and relative uri resolution, though as a user of the library, you'd mostly just construct it like Uri("http://example.com/index.html").

Meta

History

Added May 26, 2025