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

Method toString

javascript/packages/core/lib/platformBuffer.ts:56–67  ·  view source on GitHub ↗
(encoding: SupportedEncodings = "utf8", start = 0, end = this.length)

Source from the content-addressed store, hash-verified

54 }
55
56 toString(encoding: SupportedEncodings = "utf8", start = 0, end = this.length): string {
57 switch (encoding) {
58 case "utf8":
59 return this.utf8Slice(start, end);
60 case "utf16le":
61 return this.utf16LESlice(start, end);
62 case "latin1":
63 return this.latin1Slice(start, end);
64 default:
65 return "";
66 }
67 }
68
69 static alloc(size: number) {
70 return new BrowserBuffer(new Uint8Array(size));

Callers 1

startFunction · 0.95

Calls 3

utf8SliceMethod · 0.95
utf16LESliceMethod · 0.95
latin1SliceMethod · 0.95

Tested by

no test coverage detected