Characters Procedure
Converts a
String value into a list of "grapheme clusters," or what human readers would intuitively understand as "characters."
In languages using a Latin script, a letter or an accent are considered
graphemes.
A grapheme
cluster is the Latin letter combined with its accents.
For example, consider the text value "né" formed by three code points:
The function
Len returns 3 for this text because there are three code units.
However, there are only two grapheme clusters:
n and
é.
The
Characters function returns
["n", "é"] for this text.
Declaration
function Characters(this as String) as List of String
Parameters
- this as String — Any text value.
Return value
List of String — A list of the characters (grapheme clusters) in
this.
Example
Code
dim s = "n" + "e" + Chr(769)
dim x = Characters(s)
print Len(x(0))
print Len(x(1))
Output