diff xml/en/docs/njs/reference.xml @ 2271:34a1901e663d

Described charAt, codePointAt, fromCharCode in njs.
author Yaroslav Zhuravlev <yar@nginx.com>
date Wed, 31 Oct 2018 20:56:02 +0300
parents cd1b26111884
children e58e7b2eff51
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml
+++ b/xml/en/docs/njs/reference.xml
@@ -9,7 +9,7 @@
 <article name="Reference"
         link="/en/docs/njs/reference.html"
         lang="en"
-        rev="14">
+        rev="15">
 
 <section id="summary">
 
@@ -524,6 +524,16 @@ The encoding can be
 </example>
 </tag-desc>
 
+<tag-name id="string_fromcharcode"><literal>String.fromCharCode(<value>CharCode1</value>[, ...[,
+<value>CharCodeN</value>]])</literal></tag-name>
+<tag-desc>
+Returns a string from one or more Unicode code points.
+<example>
+>> String.fromCharCode(97, 98, 99, 100)
+'abcd'
+</example>
+</tag-desc>
+
 <tag-name id="string_fromcodepoint"><literal>String.fromCodePoint(<value>codePoint1</value>[, ...[,
 <value>codePoint2</value>]])</literal></tag-name>
 <tag-desc>
@@ -534,6 +544,28 @@ Returns a string from one or more Unicod
 </example>
 </tag-desc>
 
+<tag-name id="string_charat"><literal>String.prototype.charAt(<value>index</value>)</literal></tag-name>
+<tag-desc>
+Returns a string representing one Unicode code unit
+at the specified <literal>index</literal>;
+empty string if index is out of range.
+The <literal>index</literal> can be integer
+between 0 and 1-less-than the length of the string.
+If no index is provided, the default is <literal>0</literal>,
+so the first character in the string is returned.
+</tag-desc>
+
+<tag-name id="string_codepointat"><literal>String.prototype.CodePointAt(<value>position</value>)</literal></tag-name>
+<tag-desc>
+Returns a number representing the code point value of the character
+at the given index;
+<literal>undefined</literal> if there is no element at position.
+<example>
+>> 'ABCD'.codePointAt(3);
+68
+</example>
+</tag-desc>
+
 <tag-name id="string_concat"><literal>String.prototype.concat(<value>string1</value>[, ...,
 <value>stringN</value>])</literal></tag-name>
 <tag-desc>