MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / wtf8encode

Function wtf8encode

public/javascripts/socket.io.js:6410–6421  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

6408 }
6409
6410 function wtf8encode(string) {
6411 var codePoints = ucs2decode(string);
6412 var length = codePoints.length;
6413 var index = -1;
6414 var codePoint;
6415 var byteString = '';
6416 while (++index < length) {
6417 codePoint = codePoints[index];
6418 byteString += encodeCodePoint(codePoint);
6419 }
6420 return byteString;
6421 }
6422
6423 /*--------------------------------------------------------------------------*/
6424

Callers

nothing calls this directly

Calls 2

ucs2decodeFunction · 0.85
encodeCodePointFunction · 0.85

Tested by

no test coverage detected