GOLF(2gg)

NAME
decode-url - (URL-encoding)

PURPOSE
Decode URL-encoded string.

SYNTAX

        decode-url <string> [ input-length <length> ] [ status <status> ]

DESCRIPTION
decode-url will decode <string> (created by encode-url or other URL-encoding software) and store the result back into <string>. If you need <string> unchanged, make a copy of it first with copy-string. <length> in "input-length" clause specifies the number of bytes to decode; if omitted or negative, it is the string length of <string>.

All encoded values (starting with %) are decoded, and "+" (plus sign) is converted to space.

<status> number (in "status" clause) is GG_OKAY if all bytes decoded successfully, or in case of an error it is the index of the byte that could not be decoded (first byte is indexed "0"). If there is an error (for example hexadecimal value following % is invalid), the decoding stops and whatever was decoded up to that point is the result.

EXAMPLES
Decode URL-encoded string "str", after which it will hold a decoded string.

        decode-url str

SEE ALSO
 URL encoding

decode-url encode-url See all documentation