Feature/example test (#24)

example docs
This commit is contained in:
jeffery
2023-04-12 15:09:44 +08:00
committed by GitHub
parent ac72afe256
commit e9cc195c39
39 changed files with 662 additions and 28 deletions

8
strUtil/str_to_byte.go Normal file
View File

@@ -0,0 +1,8 @@
package strUtil
import "unsafe"
// StrToBytes 字符串转字节数组
func StrToBytes(v string) []byte {
return *(*[]byte)(unsafe.Pointer(&v))
}