To wit, what I’ve already tried:
- string.length returns bytes
- get_char_count() returns characters (eg. an emoji might be 5 characters)
- I can’t seem to find a way to split a string into an array of glyphs (in JavaScript: […str].length does the trick). e.g., string.split throws an error in Vala if called with an empty string as the delimiter.
@aral
See at the bottom of this page
https://web.archive.org/web/20210809205516/https://wiki.gnome.org/Projects/Vala/StringSample