Function icu_properties::sets::pattern_white_space
source · pub const fn pattern_white_space() -> CodePointSetDataBorrowed<'static>
Expand description
Characters used as whitespace in patterns (such as regular expressions). See
Unicode Standard Annex #31
for
more details.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::sets;
let pattern_white_space = sets::pattern_white_space();
assert!(pattern_white_space.contains(' '));
assert!(pattern_white_space.contains32(0x2029)); // PARAGRAPH SEPARATOR
assert!(pattern_white_space.contains32(0x000A)); // NEW LINE
assert!(!pattern_white_space.contains32(0x00A0)); // NO-BREAK SPACE