MCPcopy Create free account
hub / github.com/esengine/esengine / readString

Method readString

packages/fairygui/src/utils/ByteBuffer.ts:232–238  ·  view source on GitHub ↗

* Read string with length prefix * 读取带长度前缀的字符串

()

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

getUint16Method · 0.95
readStringWithLengthMethod · 0.95

Tested by

no test coverage detected