Function icu_properties::sets::white_space

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

Spaces, separator characters and other control characters which should be treated by programming languages as “white space” for the purpose of parsing elements

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example

use icu::properties::sets;

let white_space = sets::white_space();

assert!(white_space.contains(' '));
assert!(white_space.contains32(0x000A));  // NEW LINE
assert!(white_space.contains32(0x00A0));  // NO-BREAK SPACE
assert!(!white_space.contains32(0x200B));  // ZERO WIDTH SPACE