even more unicode.
This commit is contained in:
parent
b043571fbe
commit
d12c51fc7b
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue