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.
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