| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| src/ | 04-Jul-2025 | - | 8,323 | 4,830 | ||
| .android-checksum.json | D | 04-Jul-2025 | 1.8 KiB | 1 | 1 | |
| .cargo-checksum.json | D | 04-Jul-2025 | 1.3 KiB | 1 | 1 | |
| Android.bp | D | 04-Jul-2025 | 1.4 KiB | 57 | 53 | |
| Cargo.toml | D | 04-Jul-2025 | 2.8 KiB | 139 | 122 | |
| LICENSE | D | 04-Jul-2025 | 2.1 KiB | 47 | 36 | |
| METADATA | D | 04-Jul-2025 | 416 | 18 | 17 | |
| MODULE_LICENSE_UNICODE_3 | D | 04-Jul-2025 | 0 | |||
| README.md | D | 04-Jul-2025 | 1.9 KiB | 57 | 36 | |
| cargo_embargo.json | D | 04-Jul-2025 | 340 | 17 | 17 | |
| icu4x_bionic_dep.bp.fragment | D | 04-Jul-2025 | 61 | 5 | 5 |
README.md
1# icu_properties [](https://crates.io/crates/icu_properties) 2 3<!-- cargo-rdme start --> 4 5Definitions of [Unicode Properties] and APIs for 6retrieving property data in an appropriate data structure. 7 8This module is published as its own crate ([`icu_properties`](https://docs.rs/icu_properties/latest/icu_properties/)) 9and as part of the [`icu`](https://docs.rs/icu/latest/icu/) crate. See the latter for more details on the ICU4X project. 10 11APIs that return a `CodePointSetData` exist for binary properties and certain enumerated 12properties. 13 14APIs that return a `CodePointMapData` exist for certain enumerated properties. 15 16## Examples 17 18### Property data as `CodePointSetData`s 19 20```rust 21use icu::properties::{CodePointSetData, CodePointMapData}; 22use icu::properties::props::{GeneralCategory, Emoji}; 23 24// A binary property as a `CodePointSetData` 25 26assert!(CodePointSetData::new::<Emoji>().contains('')); // U+1F383 JACK-O-LANTERN 27assert!(!CodePointSetData::new::<Emoji>().contains('木')); // U+6728 28 29// An individual enumerated property value as a `CodePointSetData` 30 31let line_sep_data = CodePointMapData::<GeneralCategory>::new() 32 .get_set_for_value(GeneralCategory::LineSeparator); 33let line_sep = line_sep_data.as_borrowed(); 34 35assert!(line_sep.contains('\u{2028}')); 36assert!(!line_sep.contains('\u{2029}')); 37``` 38 39### Property data as `CodePointMapData`s 40 41```rust 42use icu::properties::CodePointMapData; 43use icu::properties::props::Script; 44 45assert_eq!(CodePointMapData::<Script>::new().get(''), Script::Common); // U+1F383 JACK-O-LANTERN 46assert_eq!(CodePointMapData::<Script>::new().get('木'), Script::Han); // U+6728 47``` 48 49[`ICU4X`]: ../icu/index.html 50[Unicode Properties]: https://unicode-org.github.io/icu/userguide/strings/properties.html 51 52<!-- cargo-rdme end --> 53 54## More Information 55 56For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). 57