使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
strings.url_decode
strings.url_decode(url_string)
说明
给定一个网址字符串,解码转义字符并处理已编码的 UTF-8 字符。如果解码失败,则返回空字符串。
形参数据类型
STRING
返回类型
STRING
代码示例
示例 1
此示例展示了一个正向测试用例。
strings.url_decode("three%20nine%20four") = "three nine four"
示例 2
此示例展示了空字符串的情况。
strings.url_decode("") // ""
示例 3
此示例展示了非字母字符处理。
strings.url_decode("%E4%B8%8A%E6%B5%B7%2B%E4%B8%AD%E5%9C%8B") // "上海+中國"
示例 4
此示例展示了网址解码示例。
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;'
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-10-19。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-10-19。"],[],[]]