unicode_extension

Crates.iounicode_extension
lib.rsunicode_extension
version0.3.0
sourcesrc
created_at2024-08-04 17:53:54.079573
updated_at2024-08-11 03:24:21.139359
descriptionExtension of the Unicode Segmentation crate allowing you to use a list of clusters as if they were a String
homepage
repositoryhttps://github.com/SimonTheoret/unicode_extension
max_upload_size
id1325174
size7,925
Simon Théorêt (SimonTheoret)

documentation

README

Stability

This crate is not stable at all. Use at your own risk.

Clusters

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.

Why this crate

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);

Goals

Have a similar api to std::string::String.

Commit count: 0

cargo fmt