strings.url_decode
Supported in:
strings.url_decode(url_string)
Description
Given a URL string, decode the escape characters and handle UTF-8 characters that have been encoded. Returns empty string if decoding fails.
Param data types
STRING
Return type
STRING
Code samples
Example 1
This example shows a positive test case.
strings.url_decode("three%20nine%20four") = "three nine four"
Example 2
This example shows an empty string case.
strings.url_decode("") // ""
Example 3
This example shows non-alphabet characters handling.
strings.url_decode("%E4%B8%8A%E6%B5%B7%2B%E4%B8%AD%E5%9C%8B") // "上海+中國"
Example 4
This example shows a sample URL decoding.
strings.url_decode("http://www.google.com%3Fparam1%3D%22+1+%3E+2+%22%26param2%3D2%3B") // 'http://www.google.com?param1="+1+>+2+"¶m2=2;'