(val: string, front?: boolean)
| 31 | } |
| 32 | |
| 33 | public addCString(val: string, front?: boolean) { |
| 34 | const len = byteLengthUtf8(val) |
| 35 | const bufferView = new Uint8Array(len + 1) |
| 36 | new TextEncoder().encodeInto(val, bufferView) |
| 37 | bufferView[len] = 0 |
| 38 | return this.add(bufferView.buffer, front) |
| 39 | } |
| 40 | |
| 41 | public addString(val: string, front?: boolean) { |
| 42 | const len = byteLengthUtf8(val) |
no test coverage detected