Unicode strings: Difference between revisions
→{{header|langur}}
(Added FreeBASIC) |
Langurmonkey (talk | contribs) |
||
Line 856:
=={{header|langur}}==
Source code in langur is pure UTF-8 without a BOM and without surrogate codes.
Identifiers are ASCII only. Comments and string literals may use Unicode.
Indexing on a string indexes by code point. The index may be a single number, a range, or
▲Indexing on a string indexes by code point. The index may be a single number, a range, or an list of such things.
Conversion between code point numbers, graphemes, and strings can be done with the cp2s(), s2cp(), and s2gc() functions. Conversion between UTF-8 byte lists and langur strings can be done with b2s() and s2b() functions.
Line 875 ⟶ 869:
Using a for of loop over a string gives the code point indices, and using a for in loop over a string gives the code point numbers.
Interpolation modifiers allow limiting a string by code points or by graphemes.
See langurlang.org for more details.
|