Function icu_properties::sets::xid_start

source ·
pub const fn xid_start() -> CodePointSetDataBorrowed<'static>
Expand description

Characters that can begin an identifier. See Unicode Standard Annex #31 for more details.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example

use icu::properties::sets;

let xid_start = sets::xid_start();

assert!(xid_start.contains('x'));
assert!(!xid_start.contains('1'));
assert!(!xid_start.contains('_'));
assert!(xid_start.contains('ߝ'));  // U+07DD NKO LETTER FA
assert!(!xid_start.contains('ⓧ'));  // U+24E7 CIRCLED LATIN SMALL LETTER X
assert!(!xid_start.contains32(0xFC5E));  // ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM