mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2026-04-23 00:07:09 +08:00
e9cc195c39
example docs
9 lines
150 B
Go
9 lines
150 B
Go
package byteUtil
|
|
|
|
import "unsafe"
|
|
|
|
// BytesToStr 字节数组转字符串
|
|
func BytesToStr(b []byte) string {
|
|
return *(*string)(unsafe.Pointer(&b))
|
|
}
|