Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IceFireDB/IceFireDB
/ StringToByteSlice
Function
StringToByteSlice
IceFireDB-SQLProxy/utils/zeroalloc.go:5–7 ·
view source on GitHub ↗
(s string)
Source
from the content-addressed store, hash-verified
3
import
"unsafe"
4
5
func
StringToByteSlice(s string) []byte {
6
return
*(*[]byte)(unsafe.Pointer(&s))
7
}
8
9
func
ByteSliceToString(b []byte) string {
10
return
*(*string)(unsafe.Pointer(&b))
Callers
1
writeCommandStr
Method · 0.92
Calls
no outgoing calls
Tested by
no test coverage detected