Jump to content

Unicode strings: Difference between revisions

Line 799:
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 returns another string.
 
Conversion between code point numbers and strings can be done with the cpToStringcp2s() and stringToCps2cp() functions. The stringToCps2cp() function accepts a single index number or range, returning a single code point number or an array of them. The cpToStrings2s() 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.
890

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.