MCPcopy
hub / github.com/xtermjs/xterm.js / fromByteString

Function fromByteString

src/common/input/TextDecoder.test.ts:24–30  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

22
23// convert "bytestring" (charCode 0-255) to bytes
24function fromByteString(s: string): Uint8Array {
25 const result = new Uint8Array(s.length);
26 for (let i = 0; i < s.length; ++i) {
27 result[i] = s.charCodeAt(i);
28 }
29 return result;
30}
31
32const BATCH_SIZE = 2048;
33

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected