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

Method stringLatin1

javascript/packages/core/lib/reader/index.ts:252–260  ·  view source on GitHub ↗
(len: number)

Source from the content-addressed store, hash-verified

250 }
251
252 stringLatin1(len: number) {
253 if (len < 0 || len > this.byteLength - this.cursor) {
254 throw new Error("Insufficient bytes for Latin1 string");
255 }
256 if (this.sliceStringEnable) {
257 return this.stringLatin1Fast(len);
258 }
259 return this.stringLatin1Slow(len);
260 }
261
262 private stringLatin1Fast(len: number) {
263 const result = this.bigString.substring(this.cursor, this.cursor + len);

Callers 2

stringWithHeaderMethod · 0.95
io.test.tsFile · 0.45

Calls 2

stringLatin1FastMethod · 0.95
stringLatin1SlowMethod · 0.95

Tested by

no test coverage detected