even more unicode.

This commit is contained in:
Christopher Jeffrey 2015-04-15 22:55:42 -07:00
parent b043571fbe
commit d12c51fc7b
1 changed files with 16 additions and 0 deletions

View File

@ -418,6 +418,22 @@ exports.isNonSpacing = function(str, i) {
return exports.combining[point] === true; return exports.combining[point] === true;
}; };
/*
exports.codePointAt = function(str, position) {
position = +position || 0;
var x = str.charCodeAt(position);
var y = str.length > 1 ? str.charCodeAt(position + 1) : 0;
var point = x;
if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) {
x &= 0x3FF;
y &= 0x3FF;
point = (x << 10) | y;
point += 0x10000;
}
return point;
};
*/
exports.codePointAt = function(str, position) { exports.codePointAt = function(str, position) {
if (str == null) { if (str == null) {
throw TypeError(); throw TypeError();