2 releases

Uses old Rust 2015

0.1.1 Oct 22, 2016
0.1.0 Oct 31, 2015

#276 in Text processing

Download history 224419/week @ 2023-11-16 204805/week @ 2023-11-23 244230/week @ 2023-11-30 232017/week @ 2023-12-07 233749/week @ 2023-12-14 137326/week @ 2023-12-21 154518/week @ 2023-12-28 232403/week @ 2024-01-04 237450/week @ 2024-01-11 269081/week @ 2024-01-18 245207/week @ 2024-01-25 261748/week @ 2024-02-01 271760/week @ 2024-02-08 242740/week @ 2024-02-15 268254/week @ 2024-02-22 292700/week @ 2024-02-29

1,127,354 downloads per month
Used in 1,268 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