Expand description
Β§grapheme-cluster-utils
Utilities for manipulating Rust String
s at the level of
extended grapheme clusters, as defined in Unicode Standard Annex #29.
Unlike char
(Unicode scalar values), grapheme clusters
correspond to user-perceived characters. For example:
"π©βπ"
is 3 code points but 1 grapheme cluster."πΊπΈ"
is 2 code points but 1 grapheme cluster."eΜ"
(e + combining accent) is 2 code points but 1 grapheme cluster.
These helpers make it easy to remove, insert, or replace graphemes without accidentally splitting multi-codepoint clusters.
TraitsΒ§
- Grapheme
Cluster Utils - Extension trait providing Unicode-safe string manipulation at the level of extended grapheme clusters.