Comment on The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!)

<- View Parent
Knusper@feddit.de ⁨11⁩ ⁨months⁩ ago

That Rust function returns the number of codepoints, not the number of graphemes, which is rarely useful. You need to use a facepalm emoji with skin color modifiers to see the difference.

The way to get a proper grapheme count in Rust is e.g. via this library: crates.io/crates/unicode-segmentation

source
Sort:hotnewtop