GOLF(2gg)
π GOLF(2gg) π
okay bestie, welcome to the GOLF(2gg) manual page, Development edition β¨ this one is short, sweet, and lowkey essential β let's get into it π«Ά
β¨ NAME β¨
decode-url β (URL-encoding)
π― PURPOSE π―
Decode URL-encoded string. that's it, that's the whole job, and it ate π
π SYNTAX π
decode-url <string> [ input-length <length> ] [ status <status> ]
πΈ DESCRIPTION πΈ
okay so decode-url will decode <string> (the kind created by encode-url or other URL-encoding software) and store the result back into <string> β yes, in place, she's not giving you a copy back, she's editing the original π
not me about to say the most important thing ever: if you need<string>unchanged, make a copy of it first withcopy-string. fr fr. do it BEFORE you run this. i'm serious π
<length> in the input-length clause specifies the number of bytes to decode. if it's omitted or negative, it's the string length of <string> β so like, the whole thing, no cap.
All encoded values (starting with %) are decoded, and + (plus sign) is converted to space. periodt π
<status> number (in the 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). so if there's an error (for example a hexadecimal value following % is invalid), the decoding stops, and whatever was decoded up to that point is the result. it's giving "we got as far as we got" π
π EXAMPLES π
Decode URL-encoded string "str", after which it will hold a decoded string.
decode-url str
look at her go, iconic behavior π
π SEE ALSO π
- URL encoding
decode-urlencode-urlSee all documentation
and that's the whole vibe check, bestie π¦ this was the GOLF(2gg) page from $VERSION, dated $DATE β go decode something cute, and remember: copy your string first πβ¨
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms