forked from opentofu/opentofu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add urldecode function (opentofu#1234)
Signed-off-by: pooriaghaedi <[email protected]>
- Loading branch information
1 parent
851391f
commit a3fc024
Showing
6 changed files
with
223 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
sidebar_label: urldecode | ||
description: The urldecode function applies URL decoding to a given string. | ||
--- | ||
|
||
# `urldecode` Function | ||
|
||
`urldecode` targets encoded characters within a string. | ||
|
||
The function is capable of decoding a comprehensive range of characters, | ||
including those outside the ASCII range. Non-ASCII characters are first treated as UTF-8 bytes, | ||
followed by the application of percent decoding to each byte, | ||
facilitating the accurate decoding of multibyte characters. | ||
|
||
|
||
## Examples | ||
|
||
``` | ||
> urldecode("Hello+World%21") | ||
Hello World! | ||
> urldecode("%E2%98%83") | ||
☃ | ||
> urldecode("foo%3Abar%40localhost%3Ffoo%3Dbar%26bar%3Dbaz") | ||
foo:bar@localhost?foo=bar&bar=baz | ||
``` |