UrlDecode - ObjectVision/GeoDMS GitHub Wiki
String functions UrlDecode
The UrlDecode function decodes URL-encoded strings back to their original form.
UrlDecode(strings: E->String) -> E->String
Converts URL-encoded strings back to their original format by replacing percent-encoded sequences with the corresponding characters (e.g., %20 becomes space, %26 becomes &).
Common encodings that are decoded:
- %20 → space
- %26 → &
- %3D → =
- %2F → /
- %3A → :
- %3F → ?
- Plus sign (+) may or may not be decoded to space depending on the encoding standard used
| argument | description | type |
|---|---|---|
| strings | URL-encoded strings to decode | E->String |
Time complexity: O(n × L) where n is the number of strings and L is the average string length.
Decoded strings are typically shorter than input strings.
- Invalid percent sequences (e.g., %ZZ) may produce undefined results
- UTF-8 encoded sequences are properly decoded
unit<uint32> EncodedParams: nrofrows = 3;
attribute<String> encoded (EncodedParams) := union_data(EncodedParams,
'hello%20world',
'price%3D100%26tax%3D20',
'name%3DM%C3%BCller'
);
attribute<String> decoded (EncodedParams) := UrlDecode(encoded);
// decoded = {'hello world', 'price=100&tax=20', 'name=Müller'}
- UrlEncode - reverse operation
- HtmlDecode - for HTML content
- String functions
7.0