Unicode strings: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: clarify) |
Langurmonkey (talk | contribs) |
||
Line 799: | Line 799: | ||
For clarity, identifiers are ASCII only. |
For clarity, identifiers are ASCII only. |
||
Indexing on a string indexes by code point. The index may be a single number, a range, or an array of such things |
Indexing on a string indexes by code point. The index may be a single number, a range, or an array of such things. |
||
Conversion between code point numbers and strings can be done with the |
Conversion between code point numbers and strings can be done with the cp2s() and s2cp() functions. The s2cp() function accepts a single index number or range, returning a single code point number or an array of them. The s2s() function returns a string instead. The cp2s() function accepts a single code point or an array and returns a string. |
||
The len() function returns the number of code points in a string. |
The len() function returns the number of code points in a string. |