class HttpUtility
cangjie
public class HttpUtility功能:提供 HTTP 相关的常用编码工具。
成员概览
| 成员 | 功能 |
|---|---|
| func urlEncode(String) | 对字符串执行 URL 编码。 |
| func urlDecode(String) | 对字符串执行 URL 解码。 |
func urlEncode(String)
cangjie
public static func urlEncode(value: String): String功能:对字符串执行 URL 编码。
参数:
- value:
String- 要编码的字符串。
返回值:
String- 编码后的字符串。
func urlDecode(String)
cangjie
public static func urlDecode(encodedValue: String): String功能:对字符串执行 URL 解码。
参数:
- encodedValue:
String- 要解码的字符串。
返回值:
String- 解码后的字符串。