Crates.io | unicode_extension |
lib.rs | unicode_extension |
version | 0.3.0 |
source | src |
created_at | 2024-08-04 17:53:54.079573 |
updated_at | 2024-08-11 03:24:21.139359 |
description | Extension of the Unicode Segmentation crate allowing you to use a list of clusters as if they were a String |
homepage | |
repository | https://github.com/SimonTheoret/unicode_extension |
max_upload_size | |
id | 1325174 |
size | 7,925 |
This crate is not stable at all. Use at your own risk.
Clusters are the main component of this crate. They act similarly to String, with the main difference being the index/iteration processes going over grapheme clusters, instead of char.
This crate stems from the need to have easy to use structures, similar to String, but with the grapheme clusters as its element. For example, it means that this is now trivial:
import unicode_extension::Clusters;
let s = "Étiré";
let c = Clusters::new(s, true)
let expected_clusters = Clusters(vec!["É", "t", "i", "r", "é"]);
assert_eq!(c, expected_clusters);
Have a similar api to std::string::String
.