(val: string, front?: boolean)
| 32 | } |
| 33 | |
| 34 | public addString(val: string, front?: boolean) { |
| 35 | const len = Buffer.byteLength(val) |
| 36 | const buffer = Buffer.alloc(len) |
| 37 | buffer.write(val) |
| 38 | return this.add(buffer, front) |
| 39 | } |
| 40 | |
| 41 | public addChar(char: string, first?: boolean) { |
| 42 | return this.add(Buffer.from(char, 'utf8'), first) |
no test coverage detected