()
| 52 | } |
| 53 | |
| 54 | public cstring(): string { |
| 55 | // const start = this.#offset |
| 56 | // let end = start |
| 57 | // while (this.#bufferView[end++] !== 0) {} |
| 58 | |
| 59 | const start = this.#offset |
| 60 | let end = start |
| 61 | while (this.#bufferView.getUint8(end++) !== 0) { |
| 62 | // no-op - increment until terminator reached |
| 63 | } |
| 64 | const result = this.string(end - start - 1) |
| 65 | this.#offset = end |
| 66 | return result |
| 67 | } |
| 68 | |
| 69 | public bytes(length: number): Uint8Array { |
| 70 | // const result = this.buffer.slice(this.#offset, this.#offset + length) |
no test coverage detected