mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-22 06:29:24 +08:00
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))
|
|
}
|