Function icu_properties::sets::load_for_ecma262

source ยท
pub fn load_for_ecma262(
    name: &str
) -> Result<CodePointSetDataBorrowed<'static>, PropertiesError>
Expand description

Returns a type capable of looking up values for a property specified as a string, as long as it is a binary property listed in ECMA-262, using strict matching on the names in the spec.

This handles every property required by ECMA-262 /u regular expressions, except for:

โœจ Enabled with the compiled_data Cargo feature.

๐Ÿ“š Help choosing a constructor

use icu::properties::sets;

let emoji = sets::load_for_ecma262("Emoji").expect("loading data failed");

assert!(emoji.contains('๐Ÿ”ฅ')); // U+1F525 FIRE
assert!(!emoji.contains('V'));