2 ms·
The example for how to count Unicode characters (actually graphemes I think) is incorrect. It won't catch more complicated things like emojis with skin tone mod
by makeworld 6y ago
The example for how to count Unicode characters (actually graphemes I think) is incorrect. It won't catch more complicated things like emojis with skin tone modifiers. Currently the best way I know to do this is to use the uniseg library.
https://github.com/rivo/uniseg https://github.com/rivo/uniseg