MCPcopy Create free account
hub / github.com/segmentio/encoding / Remaining

Method Remaining

json/token.go:313–315  ·  view source on GitHub ↗

Remaining returns the number of bytes left to parse. The position of the tokenizer's current Value within the original byte slice can be calculated like so: end := len(b) - tok.Remaining() start := end - len(tok.Value) And slicing b[start:end] will yield the tokenizer's current Value.

()

Source from the content-addressed store, hash-verified

311//
312// And slicing b[start:end] will yield the tokenizer's current Value.
313func (t *Tokenizer) Remaining() int {
314 return len(t.json)
315}
316
317// RawValue represents a raw json value, it is intended to carry null, true,
318// false, number, and string values only.

Callers 1

tokenizeFunction · 0.95

Calls

no outgoing calls

Tested by 1

tokenizeFunction · 0.76