Function icu::properties::sets::load_id_start
source · [−]pub fn load_id_start(
provider: &impl DataProvider<IdStartV1Marker>
) -> Result<CodePointSetData, PropertiesError>
Expand description
Characters that can begin an identifier. If using NFKC to fold differences between
characters, use load_xid_start
instead. See Unicode Standard Annex #31
for more details.
Example
use icu_properties::sets;
let data =
sets::load_id_start(&icu_testdata::unstable())
.expect("The data should be valid");
let id_start = data.as_borrowed();
assert!(id_start.contains('x'));
assert!(!id_start.contains('1'));
assert!(!id_start.contains('_'));
assert!(id_start.contains('ߝ')); // U+07DD NKO LETTER FA
assert!(!id_start.contains('ⓧ')); // U+24E7 CIRCLED LATIN SMALL LETTER X
assert!(id_start.contains32(0xFC5E)); // ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM