MCPcopy Create free account
hub / github.com/Snapchat/Valdi / decodeUtf16LE

Function decodeUtf16LE

src/valdi_modules/src/valdi/file_system/web/FileSystem.ts:16–23  ·  view source on GitHub ↗
(buf: Uint8Array)

Source from the content-addressed store, hash-verified

14 return out;
15}
16function decodeUtf16LE(buf: Uint8Array): string {
17 let s = "";
18 const len = buf.length & ~1; // even length
19 for (let i = 0; i < len; i += 2) {
20 s += String.fromCharCode(buf[i] | (buf[i + 1] << 8));
21 }
22 return s;
23}
24
25const ROOT = "/";
26function norm(p: string): string {

Callers 1

readFileSyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected