Files
opentf/website/docs/language/functions/urldecode.mdx
Pooria Ghaedi b5889b10eb Feat: urldecode function #1234 (#1283)
Signed-off-by: pooriaghaedi <pooria.ghaedi@gmail.com>
2024-03-01 15:09:45 +00:00

26 lines
675 B
Plaintext

---
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
```