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

Method getCustomString

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

* Read custom string with specified length * 读取指定长度的自定义字符串

(len: number)

Source from the content-addressed store, hash-verified

359 * 读取指定长度的自定义字符串
360 */
361 public getCustomString(len: number): string {
362 const bytes = new Uint8Array(this._data.buffer, this._data.byteOffset + this._position, len);
363 this._position += len;
364 return new TextDecoder('utf-8').decode(bytes);
365 }
366
367 /**
368 * Read sub-buffer

Callers 1

loadPackageMethod · 0.80

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected