MCPcopy Create free account
hub / github.com/cloudwego/dynamicgo / DecodeString

Method DecodeString

thrift/binary.go:2182–2188  ·  view source on GitHub ↗

DecodeString decodes a string value.

(b []byte)

Source from the content-addressed store, hash-verified

2180
2181// DecodeString decodes a string value.
2182func (d BinaryEncoding) DecodeString(b []byte) (value string) {
2183 size := d.DecodeInt32(b)
2184 v := (*rt.GoString)(unsafe.Pointer(&value))
2185 v.Ptr = rt.IndexPtr(*(*unsafe.Pointer)(unsafe.Pointer(&b)), byteTypeSize, 4)
2186 v.Len = int(size)
2187 return
2188}
2189
2190// DecodeBinary decodes a binary value.
2191func (d BinaryEncoding) DecodeBytes(b []byte) (value []byte) {

Callers 7

decodeBinaryFunction · 0.45
MustDecodeHexFunction · 0.45
DecodeTextMethod · 0.45
stringMethod · 0.45
doRecurseMethod · 0.45
decodeBase64Function · 0.45
decodeBase64Function · 0.45

Calls 2

DecodeInt32Method · 0.95
IndexPtrFunction · 0.92

Tested by

no test coverage detected