(val: string, front?: boolean)
| 39 | } |
| 40 | |
| 41 | public addString(val: string, front?: boolean) { |
| 42 | const len = byteLengthUtf8(val) |
| 43 | const bufferView = new Uint8Array(len) |
| 44 | new TextEncoder().encodeInto(val, bufferView) |
| 45 | return this.add(bufferView.buffer, front) |
| 46 | } |
| 47 | |
| 48 | public addChar(char: string, first?: boolean) { |
| 49 | const bufferView = new TextEncoder().encode(char) |
no test coverage detected