Unicode strings: Difference between revisions

m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 827:
<syntaxhighlight lang="langur">q:any"any code points here"</syntaxhighlight>
 
Indexing on a string indexes by code point. The index may be a single number, a range, or an arraylist of such things.
 
Conversion between code point numbers, graphemes, and strings can be done with the cp2s() and, s2cp(), functions.and The s2cps2gc() functionfunctions. acceptsConversion abetween singleUTF-8 indexbyte numberlists orand range,langur returningstrings acan singlebe codedone point number or an array of them. Thewith s2sb2s() function returns a string insteadand s2b(while allowing you to index by code points). The cp2s() function accepts a single code point or an array and returns a stringfunctions.
 
Conversion between UTF-8 byte arrays and langur strings can be done with b2s() and s2b() functions.
 
The len() function returns the number of code points in a string.
889

edits