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

Method String

protocol/net/io/encoding/writer.go:89–95  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

87}
88
89func (w Writer) String(s string) error {
90 if err := w.VarInt(int32(len(s))); err != nil {
91 return err
92 }
93 _, err := w.Write(unsafe.Slice(unsafe.StringData(s), len(s))) //(*(*[]byte)(unsafe.Pointer(&s)))
94 return err
95}
96
97func (w Writer) Identifier(s string) error {
98 if len(s) > 32767 {

Callers 1

StringTextComponentMethod · 0.95

Calls 2

VarIntMethod · 0.95
WriteMethod · 0.95

Tested by

no test coverage detected