[Web]UrlThe URL percent codec: component encoding/decoding plus query- and form-string parsing — pure class-side functions, no network.
[Web]Url.encode:'a b/c' "* -> a%20b%2Fc [Web]Url.decode:'h%C3%A9llo' "* -> héllo [Web]Url.queryParse:'a=1&b=two&flag' "* -> #{'a': '1' 'b': 'two' 'flag': ''} [Web]Url.formDecode:'q=a+b%2Bc' "* -> #{'q': 'a b+c'}
Decode %XX escapes (case-insensitive hex); every other byte passes through, and the result is read as UTF-8. '+' is NOT special here — that is form decoding (formDecode:). A truncated or non-hex escape, or invalid UTF-8, throws ValueError.
Decode one query/form component: '+' -> space first (when asked — so an escaped %2B still decodes to a literal plus), then the %XX pass.
Percent-encode s as a URL component: unreserved characters (RFC 3986 ALPHA / DIGIT / '-' / '.' / '_' / '~') pass through, every other UTF-8 byte becomes %XX (uppercase hex).
application/x-www-form-urlencoded: like queryParse:, but '+' decodes to a space (in keys and values both).
The value of one hex-digit byte; a non-hex byte throws ValueError.
Internal: the shared query/form parser — split on '&' and '=', decode each side through decodeComponent:plusAsSpace:.
Parse a query string ('a=1&b=two&flag') into a Map: keys and values percent-decoded, a bare key mapping to '', a repeated key keeping the LAST value, empty segments ignored. '+' stays a literal plus.
RFC 3986 unreserved byte?