Files
go-easy-utils/byteUtil/byte_to_str.go
jeffery e9cc195c39 Feature/example test (#24)
example docs
2023-04-12 15:09:44 +08:00

9 lines
150 B
Go

package byteUtil
import "unsafe"
// BytesToStr 字节数组转字符串
func BytesToStr(b []byte) string {
return *(*string)(unsafe.Pointer(&b))
}