MCPcopy Create free account
hub / github.com/microsoft/SandDance / charCode

Function charCode

docs/tests/v2/es6/js/sanddance.js:141235–141238  ·  view source on GitHub ↗
(chr)

Source from the content-addressed store, hash-verified

141233
141234 // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal
141235 function charCode(chr) {
141236 var esc = /^\\[xu](.+)/.exec(chr);
141237 return esc ? dec(esc[1]) : chr.charCodeAt(chr[0] === '\\' ? 1 : 0);
141238 }
141239
141240 // Inverts a list of ordered BMP characters and ranges
141241 function invertBmp(range) {

Callers 1

invertBmpFunction · 0.85

Calls 1

decFunction · 0.85

Tested by

no test coverage detected