Closed gpwclark closed 2 years ago
make sure to use unicode-width packge to get proper length.
something like
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum GraphemeCluster {
Char(char),
Cluster(Option<Vec<char>>),
}
in a vector... maybe? make the common case simpler but accomodates code points that can be up to 6 bytes.
issue because using key strings on ut8 code points represented as multiple characters like
“नमस्ते”
just doesn't work properly.
One possible solution is to adopt
unicode-segmentation
crate to reduce the impact on code.