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
()
| 294 | // |
| 295 | // If the tokenizer is not positioned on a string, the behavior is undefined. |
| 296 | func (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 | // |
nothing calls this directly
no test coverage detected