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

Function DecodeString

smartcontract/service/native/utils/serialization.go:101–111  ·  view source on GitHub ↗
(source *common.ZeroCopySource)

Source from the content-addressed store, hash-verified

99 return data, nil
100}
101func DecodeString(source *common.ZeroCopySource) (string, error) {
102 data, _, irregular, eof := source.NextString()
103 if eof {
104 return "", io.ErrUnexpectedEOF
105 }
106 if irregular {
107 return "", common.ErrIrregularData
108 }
109
110 return data, nil
111}

Callers 15

DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92
DeserializationMethod · 0.92

Calls 1

NextStringMethod · 0.80

Tested by

no test coverage detected