函数原型
func hex(s1 string) stringfunc hex(b1 bytes) string
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
hex函数主要是用来将所给字符串或者字节数组进行十六进制编码,并输出编码后的字符串
func hex(s1 string) stringfunc hex(b1 bytes) string| 参数名称 | 参数介绍 |
|---|---|
s1/b1 | 为需要进行编码的字符串或者字节数组 |
| 待转换数据 | 转换语句 | 输出结果 |
|---|---|---|
"asdf" | hex("asdf") | 61736466 |
b"asdf" | hex(b"asdf") | 61736466 |
Was this page helpful?
