MCPcopy Create free account
hub / github.com/dotabuff/manta / readString

Method readString

reader.go:299–310  ·  view source on GitHub ↗

readString reads a null terminated string

()

Source from the content-addressed store, hash-verified

297
298// readString reads a null terminated string
299func (r *reader) readString() string {
300 buf := make([]byte, 0)
301 for {
302 b := r.readByte()
303 if b == 0 {
304 break
305 }
306 buf = append(buf, b)
307 }
308
309 return string(buf)
310}
311
312// readCoord reads a coord as a float32
313func (r *reader) readCoord() float32 {

Callers 3

TestReaderStringsFunction · 0.80
stringDecoderFunction · 0.80
parseStringTableFunction · 0.80

Calls 1

readByteMethod · 0.95

Tested by 1

TestReaderStringsFunction · 0.64