$$urlencode
URL encodes as string
Usageβ
{
"$$urlencode": /* String to encode */,
"charset": "UTF-8" /* or UTF-16 */
}
"$$urlencode([charset]):{input}"
note
Concrete values in the usage example are default values.
Returnsβ
string
Argumentsβ
Argument | Type | Values | Required / DefaultΒ Value | Description |
---|---|---|---|---|
Primary | string | Yes | String to encode | |
charset | enum | UTF-8 / UTF-16 | UTF-8 | Character encoding to use |
Examplesβ
Input
Definition
Output
"not url+safe?=x&b=path/path"
"$$urlencode:$"
"not+url%2Bsafe%3F%3Dx%26b%3Dpath%2Fpath"
null
"$$urlencode:not url+safe?=x&b=path/path"
"not+url%2Bsafe%3F%3Dx%26b%3Dpath%2Fpath"
"hello+unicode+ππ¨βπ©βπ§βπ¦πͺ¬"
"$$urlencode(UTF-8):$"
"hello%2Bunicode%2B%F0%9F%98%80%F0%9F%91%A8%E2%80%8D%F0%9F%91%A9%E2%80%8D%F0%9F%91%A7%E2%80%8D%F0%9F%91%A6%F0%9F%AA%AC"
"hello+unicode+ππ¨βπ©βπ§βπ¦πͺ¬"
"$$urlencode(UTF-16):$"
"hello%FE%FF%00%2Bunicode%FE%FF%00%2B%D8%3D%DE%00%D8%3D%DC%68%20%0D%D8%3D%DC%69%20%0D%D8%3D%DC%67%20%0D%D8%3D%DC%66%D8%3E%DE%AC"