var code;
str = stripVTControlCharacters(str);
for (var i = 0, len = str.length; i < len; i++) {
- code = codePointAt(str, i);
+ code = str.codePointAt(i);
if (code >= 0x10000) { // surrogates
i++;
}
// move the cursor to the beginning of the next line.
if (cols + 1 === columns &&
this.cursor < this.line.length &&
- isFullWidthCodePoint(codePointAt(this.line, this.cursor))) {
+ isFullWidthCodePoint(this.line.codePointAt(this.cursor))) {
rows++;
cols = 0;
}
var width = 0;
str = stripVTControlCharacters(str);
for (var i = 0, len = str.length; i < len; i++) {
- var code = codePointAt(str, i);
+ var code = str.codePointAt(i);
if (code >= 0x10000) { // surrogates
i++;
}
}
return code;
}
-exports.codePointAt = codePointAt;
+exports.codePointAt = util.deprecate(codePointAt,
+ 'codePointAt() is deprecated. Use String.prototype.codePointAt');
/**