(string: string = '')
| 56 | } |
| 57 | |
| 58 | public addString(string: string = ''): Writer { |
| 59 | const length = byteLengthUtf8(string) |
| 60 | this.#ensure(length) |
| 61 | this.#encoder.encodeInto( |
| 62 | string, |
| 63 | new Uint8Array(this.#bufferView.buffer, this.#offset), |
| 64 | ) |
| 65 | this.#offset += length |
| 66 | return this |
| 67 | } |
| 68 | |
| 69 | public add(otherBuffer: ArrayBuffer): Writer { |
| 70 | this.#ensure(otherBuffer.byteLength) |
no test coverage detected