2 releases

Uses old Rust 2015

0.1.1 Oct 22, 2016
0.1.0 Oct 31, 2015

#204 in Text processing

Download history 335703/week @ 2024-06-20 357782/week @ 2024-06-27 318500/week @ 2024-07-04 325851/week @ 2024-07-11 329414/week @ 2024-07-18 347817/week @ 2024-07-25 337115/week @ 2024-08-01 370558/week @ 2024-08-08 371036/week @ 2024-08-15 393017/week @ 2024-08-22 365605/week @ 2024-08-29 405359/week @ 2024-09-05 395352/week @ 2024-09-12 402515/week @ 2024-09-19 420274/week @ 2024-09-26 356984/week @ 2024-10-03

1,648,343 downloads per month
Used in 1,690 crates (24 directly)

MIT/Apache

400KB
4K SLoC

unicode-categories

unicode-categories is a simple crate that adds many extensions to the char type that allow for the querying of whether or not a character is a member of a certain category of unicode characters.

use unicode_categories::UnicodeCategories;

assert!('a'.is_letter_lowercase());
assert!('A'.is_letter_uppercase());
assert!('\n'.is_other_control());

This crate can be obtained from crates.io and used as a dependency like any other crate.

Regenerating the tables

The script in scripts/unicode.py reads a file named UnicodeData.txt, which is assumed to be in the current working directory. This file can be obtained from ftp://ftp.unicode.org . The script outputs a rust file to standard out, which can be piped to the desired location.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps