对 URI 组件进行编码 (string.encode_uri_component)
声明
编码后的URI组件 = string.encode_uri_component(URI组件)
参数
- URI组件
字符串型,URI 组件
返回值
- 编码后的URI组件
文本型,返回编码后的 URI 组件
说明
将 URI 组件编码,将 URI 组件中的特殊字符进行编码
关键词:URI 组件编码
这个函数在 20250313 以后版本方可使用
示例
nLog(string.encode_uri_component("https://www.example.com/测试")) -- https%3A%2F%2Fwww.example.com%2F%E6%B5%8B%E8%AF%95