Crates.io | unicode_categories_zheyuye |
lib.rs | unicode_categories_zheyuye |
version | 0.1.2 |
source | src |
created_at | 2023-08-14 07:20:56.604816 |
updated_at | 2023-08-14 07:20:56.604816 |
description | Query Unicode category membership for chars |
homepage | |
repository | https://github.com/zheyuye/unicode-categories |
max_upload_size | |
id | 943910 |
size | 471,910 |
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.
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.
Licensed under either of
at your option.
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.