So, challenge to the #gnome #gtk #vala wizards out there: is this the best we can do to count Unicode glyphs in a string (equivalent of string.characters.count in Swift) or is there a more performant way I don’t know about?
(It’s fast enough for my needs but not ideal by any means.)
https://ar.al/2021/10/31/how-to-count-unicode-glyphs-in-vala-using-gtk/
@aral Unrelated to the technical point but more a statement of where we are with respect to representing our languages using computers. It's endless screaming all the way down! I was laughing as I read your post because yesterday I had read this: "Furthermore, we would like to suggest that counting or otherwise iterating over Unicode code points should not be seen as a particularly important task in text processing scenarios." And I thought… well… maybe one day? 😆
https://utf8everywhere.org/