Function icu::properties::maps::load_line_break
source · [−]pub fn load_line_break(
provider: &impl DataProvider<LineBreakV1Marker>
) -> Result<CodePointMapData<LineBreak>, PropertiesError>
Expand description
Return a CodePointMapData
for the Line_Break Unicode enumerated
property. See [LineBreak
].
Note: Use icu::segmenter
for an all-in-one break iterator implementation.
Example
use icu::properties::{maps, LineBreak};
let data = maps::load_line_break(&icu_testdata::unstable()).expect("The data should be valid!");
let lb = data.as_borrowed();
assert_eq!(lb.get(')'), LineBreak::CloseParenthesis); // U+0029: Right Parenthesis
assert_eq!(lb.get('ぁ'), LineBreak::ConditionalJapaneseStarter); //U+3041: Hiragana Letter Small A