MCPcopy Create free account
hub / github.com/nodejs/node / ReplaceIsolatedSurrogates

Function ReplaceIsolatedSurrogates

deps/v8/test/mjsunit/wasm/stringrefs-exec-gc.js:66–73  ·  view source on GitHub ↗
(str, replacement='\ufffd')

Source from the content-addressed store, hash-verified

64 return false;
65}
66function ReplaceIsolatedSurrogates(str, replacement='\ufffd') {
67 let replaced = '';
68 for (let codepoint of str) {
69 replaced +=
70 IsSurrogate(codepoint.codePointAt(0)) ? replacement : codepoint;
71 }
72 return replaced;
73}
74
75function makeWtf8TestDataSegment() {
76 let data = []

Callers 1

Calls 1

IsSurrogateFunction · 0.70

Tested by

no test coverage detected