Function icu_properties::maps::word_break

source ·
pub const fn word_break() -> CodePointMapDataBorrowed<'static, WordBreak>
Expand description

Return a CodePointMapDataBorrowed for the Word_Break Unicode enumerated property. See WordBreak.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

Note: Use icu::segmenter for an all-in-one break iterator implementation.

§Example

use icu::properties::{maps, WordBreak};

assert_eq!(maps::word_break().get('.'), WordBreak::MidNumLet); // U+002E: Full Stop
assert_eq!(maps::word_break().get(','), WordBreak::MidNum); // U+FF0C: Fullwidth Comma