# HG changeset patch # User Yaroslav Zhuravlev # Date 1541008562 -10800 # Node ID 34a1901e663de6ea27b0832b11c77768d0a7384d # Parent cd99349249209cda52f817458d066772cb749c9f Described charAt, codePointAt, fromCharCode in njs. diff --git a/xml/en/docs/njs/compatibility.xml b/xml/en/docs/njs/compatibility.xml --- a/xml/en/docs/njs/compatibility.xml +++ b/xml/en/docs/njs/compatibility.xml @@ -9,7 +9,7 @@
+ rev="5">
@@ -59,12 +59,12 @@ ES6 Number and ES5.1: -fromCharCode, +fromCharCode, concat, slice, substring, substr, -charAt, +charAt, indexOf, lastIndexOf, toLowerCase, @@ -79,7 +79,7 @@ ES5.1: ES6: fromCodePoint, -codePointAt, +codePointAt, includes, startsWith, endsWith, diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="15">
@@ -524,6 +524,16 @@ The encoding can be +String.fromCharCode(CharCode1[, ...[, +CharCodeN]]) + +Returns a string from one or more Unicode code points. + +>> String.fromCharCode(97, 98, 99, 100) +'abcd' + + + String.fromCodePoint(codePoint1[, ...[, codePoint2]]) @@ -534,6 +544,28 @@ Returns a string from one or more Unicod +String.prototype.charAt(index) + +Returns a string representing one Unicode code unit +at the specified index; +empty string if index is out of range. +The index can be integer +between 0 and 1-less-than the length of the string. +If no index is provided, the default is 0, +so the first character in the string is returned. + + +String.prototype.CodePointAt(position) + +Returns a number representing the code point value of the character +at the given index; +undefined if there is no element at position. + +>> 'ABCD'.codePointAt(3); +68 + + + String.prototype.concat(string1[, ..., stringN]) diff --git a/xml/ru/docs/njs/compatibility.xml b/xml/ru/docs/njs/compatibility.xml --- a/xml/ru/docs/njs/compatibility.xml +++ b/xml/ru/docs/njs/compatibility.xml @@ -9,7 +9,7 @@
+ rev="5">
@@ -59,12 +59,12 @@ ES6 методы и свойства Number и ES5.1: -fromCharCode, +fromCharCode, concat, slice, substring, substr, -charAt, +charAt, indexOf, lastIndexOf, toLowerCase, @@ -79,7 +79,7 @@ ES5.1: ES6: fromCodePoint, -codePointAt, +codePointAt, includes, startsWith, endsWith,