icu_properties::sets

Function pattern_syntax

Source
pub const fn pattern_syntax() -> CodePointSetDataBorrowed<'static>
Expand description

Characters used as syntax in patterns (such as regular expressions). 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 pattern_syntax = sets::pattern_syntax();

assert!(pattern_syntax.contains('{'));
assert!(pattern_syntax.contains('โ‡’'));  // U+21D2 RIGHTWARDS DOUBLE ARROW
assert!(!pattern_syntax.contains('0'));