(string: string, offset: number)
| 46 | } |
| 47 | |
| 48 | private ucs2Write(string: string, offset: number): void { |
| 49 | for (let i = 0; i < string.length; i++) { |
| 50 | const codePoint = string.charCodeAt(i); |
| 51 | this[offset++] = codePoint & 0xFF; |
| 52 | this[offset++] = (codePoint >> 8) & 0xFF; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | toString(encoding: SupportedEncodings = "utf8", start = 0, end = this.length): string { |
| 57 | switch (encoding) { |