MCPcopy Index your code
hub / github.com/deployd/deployd / codePointsToString

Function codePointsToString

test-app/public/sinon.js:5537–5550  ·  view source on GitHub ↗

* @param {!Array. } code_points Array of code points. * @return {string} string String of UTF-16 code units.

(code_points)

Source from the content-addressed store, hash-verified

5535 * @return {string} string String of UTF-16 code units.
5536 */
5537 function codePointsToString(code_points) {
5538 var s = '';
5539 for (var i = 0; i < code_points.length; ++i) {
5540 var cp = code_points[i];
5541 if (cp <= 0xFFFF) {
5542 s += String.fromCharCode(cp);
5543 } else {
5544 cp -= 0x10000;
5545 s += String.fromCharCode((cp >> 10) + 0xD800,
5546 (cp & 0x3FF) + 0xDC00);
5547 }
5548 }
5549 return s;
5550 }
5551
5552
5553 //

Callers 1

serializeStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected