MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / readString

Function readString

modules/base/cli/commands/archive.js:86–95  ·  view source on GitHub ↗
(archive, position)

Source from the content-addressed store, hash-verified

84}
85
86function readString(archive, position) {
87 let result = "";
88 while (true) {
89 let bytes = new Uint8Array(archive.read(position++, 1));
90 if (0 == bytes[0])
91 break;
92 result += String.fromCharCode(bytes[0]);
93 }
94 return result;
95}

Callers 2

flash.jsFile · 0.85
archive.jsFile · 0.85

Calls 1

readMethod · 0.65

Tested by

no test coverage detected