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

Method EncodeString

thrift/binary.go:2134–2137  ·  view source on GitHub ↗

EncodeString encodes a string value.

(b []byte, v string)

Source from the content-addressed store, hash-verified

2132
2133// EncodeString encodes a string value.
2134func (BinaryEncoding) EncodeString(b []byte, v string) {
2135 binary.BigEndian.PutUint32(b, uint32(len(v)))
2136 copy(b[4:], v)
2137}
2138
2139// EncodeBinary encodes a binary value.
2140func (BinaryEncoding) EncodeBinary(b []byte, v []byte) {

Callers 5

EncodeEmptyMethod · 0.95
TestDefalutValueFunction · 0.45
makeDefaultValueFunction · 0.45
NewNodeStringFunction · 0.45
ToRawMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestDefalutValueFunction · 0.36