MCPcopy Index your code
hub / github.com/nodejs/node / encodeWtf16LE

Function encodeWtf16LE

deps/v8/test/mjsunit/wasm/stringrefs-exec.js:256–265  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

254})();
255
256function encodeWtf16LE(str) {
257 // String iterator coalesces surrogate pairs.
258 let out = [];
259 for (let i = 0; i < str.length; i++) {
260 codeunit = str.charCodeAt(i);
261 out.push(codeunit & 0xff)
262 out.push(codeunit >> 8);
263 }
264 return out;
265}
266
267function makeWtf16TestDataSegment() {
268 let data = []

Callers 3

makeWtf16TestDataSegmentFunction · 0.70
stringrefs-exec.jsFile · 0.70
checkEncodingFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected