* Read string with length prefix * 读取带长度前缀的字符串
()
| 230 | * 读取带长度前缀的字符串 |
| 231 | */ |
| 232 | public readString(): string { |
| 233 | const len = this.getUint16(); |
| 234 | if (len === 0) { |
| 235 | return ''; |
| 236 | } |
| 237 | return this.readStringWithLength(len); |
| 238 | } |
| 239 | |
| 240 | private readStringWithLength(len: number): string { |
| 241 | const bytes = new Uint8Array(this._data.buffer, this._data.byteOffset + this._position, len); |
nothing calls this directly
no test coverage detected