MCPcopy Create free account
hub / github.com/DNAProject/DNA / EncodeString

Function EncodeString

vm/crossvm_codec/codec.go:204–208  ·  view source on GitHub ↗
(sink *common.ZeroCopySink, buf string)

Source from the content-addressed store, hash-verified

202}
203
204func EncodeString(sink *common.ZeroCopySink, buf string) {
205 sink.WriteByte(StringType)
206 sink.WriteUint32(uint32(len(buf)))
207 sink.WriteBytes([]byte(buf))
208}
209
210func EncodeAddress(sink *common.ZeroCopySink, addr common.Address) {
211 sink.WriteByte(AddressType)

Callers 2

EncodeValueFunction · 0.85
EncodeListFunction · 0.85

Calls 3

WriteByteMethod · 0.80
WriteUint32Method · 0.80
WriteBytesMethod · 0.80

Tested by

no test coverage detected