2 releases

Uses old Rust 2015

0.1.1 Oct 22, 2016
0.1.0 Oct 31, 2015

#193 in Text processing

Download history 362681/week @ 2024-08-07 368118/week @ 2024-08-14 388672/week @ 2024-08-21 367556/week @ 2024-08-28 410263/week @ 2024-09-04 395289/week @ 2024-09-11 391366/week @ 2024-09-18 420544/week @ 2024-09-25 438406/week @ 2024-10-02 445361/week @ 2024-10-09 474147/week @ 2024-10-16 496062/week @ 2024-10-23 468708/week @ 2024-10-30 466473/week @ 2024-11-06 496296/week @ 2024-11-13 402816/week @ 2024-11-20

1,928,715 downloads per month
Used in 1,744 crates (25 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