MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / writeString

Method writeString

protocol/nbt/encoder.go:106–111  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

104}
105
106func (e *Encoder) writeString(s string) error {
107 if err := e.writeShort(int16(len(s))); err != nil {
108 return err
109 }
110 return e.writeBytes([]byte(s)...)
111}
112
113func (e *Encoder) encodeCompoundStruct(val reflect.Value) error {
114 for i := 0; i < val.NumField(); i++ {

Callers 4

EncodeMethod · 0.95
encodeCompoundStructMethod · 0.95
encodeCompoundMapMethod · 0.95
encodeListMethod · 0.95

Calls 2

writeShortMethod · 0.95
writeBytesMethod · 0.95

Tested by

no test coverage detected