MCPcopy Create free account
hub / github.com/apache/fory / utf8Slice

Method utf8Slice

javascript/packages/core/lib/platformBuffer.ts:102–107  ·  view source on GitHub ↗
(start: number, end: number)

Source from the content-addressed store, hash-verified

100 }
101
102 private utf8Slice(start: number, end: number) {
103 if (end - start < 1) {
104 return "";
105 }
106 return utf8Decoder.decode(this.subarray(start, end));
107 }
108
109 copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number) {
110 target.set(this.subarray(sourceStart, sourceEnd), targetStart);

Callers 1

toStringMethod · 0.95

Calls 2

decodeMethod · 0.65
subarrayMethod · 0.45

Tested by

no test coverage detected