MCPcopy
hub / github.com/tinylib/msgp / ReadStringBytes

Function ReadStringBytes

msgp/read_bytes.go:989–992  ·  view source on GitHub ↗

ReadStringBytes reads a 'str' object from 'b' and returns its value and the remaining bytes in 'b'. Possible errors: - [ErrShortBytes] (b not long enough) - [TypeError] (not 'str' type) - [InvalidPrefixError]

(b []byte)

Source from the content-addressed store, hash-verified

987// - [TypeError] (not 'str' type)
988// - [InvalidPrefixError]
989func ReadStringBytes(b []byte) (string, []byte, error) {
990 v, o, err := ReadStringZC(b)
991 return string(v), o, err
992}
993
994// ReadStringAsBytes reads a 'str' object
995// into a slice of bytes. 'v' is the value of

Callers 6

UnmarshalMsgMethod · 0.92
UnmarshalMsgMethod · 0.92
TestReadStringBytesFunction · 0.85
FuzzReadBytesFunction · 0.85
UnmarshalMsgMethod · 0.85
readIntfBytesDepthFunction · 0.85

Calls 1

ReadStringZCFunction · 0.85

Tested by 3

TestReadStringBytesFunction · 0.68
FuzzReadBytesFunction · 0.68
UnmarshalMsgMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…