MCPcopy Index your code
hub / github.com/segmentio/encoding / String

Method String

json/token.go:296–302  ·  view source on GitHub ↗

String returns a byte slice containing the value of the json string that the tokenizer is currently pointing at. This method must only be called after checking the kind of the token via a call to Kind. When possible, the returned byte slice references the backing array of the tokenizer. A new slic

()

Source from the content-addressed store, hash-verified

294//
295// If the tokenizer is not positioned on a string, the behavior is undefined.
296func (t *Tokenizer) String() []byte {
297 if t.flags.kind() == Unescaped && len(t.Value) > 1 {
298 return t.Value[1 : len(t.Value)-1] // unquote
299 }
300 s, _, _, _ := t.parseStringUnquote(t.Value, nil)
301 return s
302}
303
304// Remaining returns the number of bytes left to parse.
305//

Callers

nothing calls this directly

Calls 2

kindMethod · 0.80
parseStringUnquoteMethod · 0.80

Tested by

no test coverage detected