Function icu::properties::sets::load_math

source ·
pub fn load_math(
    provider: &impl DataProvider<MathV1Marker>
) -> Result<CodePointSetData, PropertiesError>
Expand description

Characters used in mathematical notation

Example

use icu_properties::sets;

let data =
    sets::load_math(&icu_testdata::unstable())
        .expect("The data should be valid");
let math = data.as_borrowed();

assert!(math.contains('='));
assert!(math.contains('+'));
assert!(!math.contains('-'));
assert!(math.contains('−'));  // U+2212 MINUS SIGN
assert!(!math.contains('/'));
assert!(math.contains('∕'));  // U+2215 DIVISION SLASH