MCPcopy
hub / github.com/tidwall/gjson / stringBytes

Function stringBytes

gjson.go:3360–3366  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

3358}
3359
3360func stringBytes(s string) []byte {
3361 return *(*[]byte)(unsafe.Pointer(&sliceHeader{
3362 data: (*stringHeader)(unsafe.Pointer(&s)).data,
3363 len: len(s),
3364 cap: len(s),
3365 }))
3366}
3367
3368func bytesString(b []byte) string {
3369 return *(*string)(unsafe.Pointer(&b))

Callers 3

ValidFunction · 0.85
modPrettyFunction · 0.85
modUglyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…