(encoding: SupportedEncodings = "utf8", start = 0, end = this.length)
| 54 | } |
| 55 | |
| 56 | toString(encoding: SupportedEncodings = "utf8", start = 0, end = this.length): string { |
| 57 | switch (encoding) { |
| 58 | case "utf8": |
| 59 | return this.utf8Slice(start, end); |
| 60 | case "utf16le": |
| 61 | return this.utf16LESlice(start, end); |
| 62 | case "latin1": |
| 63 | return this.latin1Slice(start, end); |
| 64 | default: |
| 65 | return ""; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | static alloc(size: number) { |
| 70 | return new BrowserBuffer(new Uint8Array(size)); |
no test coverage detected