()
| 646 | } |
| 647 | |
| 648 | cString(): string { |
| 649 | const end = this.bytes.indexOf(0, this.offset) |
| 650 | if (end === -1 || end >= this.limit) { |
| 651 | throw new ParseError({ message: "Unterminated string" }) |
| 652 | } |
| 653 | const value = decodeUtf8(this.bytes, this.offset, end - this.offset) |
| 654 | this.offset = end + 1 |
| 655 | return value |
| 656 | } |
| 657 | } |
| 658 | |
| 659 | /** Below this length a per-character loop beats `TextDecoder.decode`. */ |
nothing calls this directly
no test coverage detected