函数原型
func htmlUnescape(s1 string) stringfunc htmlUnescape(b1 bytes) string
参数介绍
| 参数名称 | 参数介绍 |
|---|---|
s1/b1 | 为需要进行解码的字符串或者字节数组 |
举例
| 待转换数据 | 转换语句 | 输出结果 |
|---|---|---|
"<map>" | htmlUnescape("<map>") | <map> |
b""Fran & Freddie's Diner" <tasty@example.com>" | htmlUnescape(b""Fran & Freddie's Diner" <tasty@example.com>") | "Fran & Freddie's Diner" <tasty@example.com>" |
"<map>" | htmlUnescape("<map>") | <map> |

