Mercurial > hg > nginx-site
comparison xml/en/docs/njs/njs_api.xml @ 2212:c34a885b9d99
Documented padEnd() and padStart() for njs.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 31 Jul 2018 16:42:45 +0300 |
parents | 660229c5c92f |
children | e029f4bc7ede |
comparison
equal
deleted
inserted
replaced
2211:660229c5c92f | 2212:c34a885b9d99 |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="njs API" | 9 <article name="njs API" |
10 link="/en/docs/njs/njs_api.html" | 10 link="/en/docs/njs/njs_api.html" |
11 lang="en" | 11 lang="en" |
12 rev="4"> | 12 rev="5"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="../njs_about.xml">njs</link> provides objects, methods and properties | 17 <link doc="../njs_about.xml">njs</link> provides objects, methods and properties |
202 <tag-desc> | 202 <tag-desc> |
203 Matches a string against a <literal>regexp</literal>. | 203 Matches a string against a <literal>regexp</literal>. |
204 <example> | 204 <example> |
205 >> 'nginx'.match( /ng/i ) | 205 >> 'nginx'.match( /ng/i ) |
206 ng | 206 ng |
207 </example> | |
208 </tag-desc> | |
209 | |
210 <tag-name id="string_padend"><literal>String.prototype.padEnd(<value>length</value> | |
211 [, <value>string</value>])</literal></tag-name> | |
212 <tag-desc> | |
213 Returns a string of a specified <literal>length</literal> | |
214 with the pad <literal>string</literal> applied | |
215 to the end of the specified string (0.2.3). | |
216 <example> | |
217 >> '1234'.padEnd(8, 'abcd') | |
218 '1234abcd' | |
219 </example> | |
220 </tag-desc> | |
221 | |
222 <tag-name id="string_padstart"><literal>String.prototype.padStart(<value>length</value> | |
223 [, <value>string</value>])</literal></tag-name> | |
224 <tag-desc> | |
225 Returns a string of a specified <literal>length</literal> | |
226 with the pad <literal>string</literal> applied | |
227 to the start of the specified string (0.2.3). | |
228 <example> | |
229 >> '1234'.padStart(8, 'abcd') | |
230 'abcd1234' | |
207 </example> | 231 </example> |
208 </tag-desc> | 232 </tag-desc> |
209 | 233 |
210 <tag-name><literal>String.prototype.repeat(<value>number</value>)</literal></tag-name> | 234 <tag-name><literal>String.prototype.repeat(<value>number</value>)</literal></tag-name> |
211 <tag-desc> | 235 <tag-desc> |