MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeUnsafeStringAscending

Function DecodeUnsafeStringAscending

pkg/util/encoding/encoding.go:1004–1007  ·  view source on GitHub ↗

DecodeUnsafeStringAscending decodes a string value from the input buffer which was encoded using EncodeString or EncodeBytes. The r []byte is used as a temporary buffer in order to avoid memory allocations. The remainder of the input buffer and the decoded string are returned. Note that the returned

(b []byte, r []byte)

Source from the content-addressed store, hash-verified

1002// input buffer and the decoded string are returned. Note that the returned
1003// string may share storage with the input buffer.
1004func DecodeUnsafeStringAscending(b []byte, r []byte) ([]byte, string, error) {
1005 b, r, err := DecodeBytesAscending(b, r)
1006 return b, UnsafeConvertBytesToString(r), err
1007}
1008
1009// DecodeUnsafeStringAscendingDeepCopy is the same as
1010// DecodeUnsafeStringAscending but the returned string will never share storage

Callers 1

prettyPrintFirstValueFunction · 0.85

Calls 2

DecodeBytesAscendingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…