UrlDecoder.decode

Decodes '%' encoded characters in str, replacing them in-place.

Checks whether the passed source string contains any characters encoded according to the RFC 2396 escape format. (A '%' character followed by two hexadecimal digits.)

The non-standard 4-digit unicode encoding scheme is also supported ("%u" followed by four hex digits). Such characters are converted to UTF-8.

Note that the original content in str is overwritten with the decoded content. The resulting content is at most as long as the original. The returned string slices the valid content in str. str itself may contain tailing junk.

class UrlDecoder
static
decode
out (str_out) { assert (str_out.ptr is str.ptr); }

Parameters

str mstring

string to decode

Return Value

Type: mstring

the decoded str content (slices str from the beginning)

Out: The returned array slices str from the beginning.

Meta