Struct icu_capi::segmenter_grapheme::ffi::GraphemeClusterSegmenter
source · pub struct GraphemeClusterSegmenter(/* private fields */);
Expand description
An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
Implementations§
source§impl GraphemeClusterSegmenter
impl GraphemeClusterSegmenter
sourcepub fn create(
provider: &DataProvider,
) -> Result<Box<GraphemeClusterSegmenter>, DataError>
pub fn create( provider: &DataProvider, ) -> Result<Box<GraphemeClusterSegmenter>, DataError>
Construct an GraphemeClusterSegmenter
.
sourcepub fn segment_utf8<'a>(
&'a self,
input: &'a DiplomatStr,
) -> Box<GraphemeClusterBreakIteratorUtf8<'a>>
pub fn segment_utf8<'a>( &'a self, input: &'a DiplomatStr, ) -> Box<GraphemeClusterBreakIteratorUtf8<'a>>
Segments a string.
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn segment_utf16<'a>(
&'a self,
input: &'a DiplomatStr16,
) -> Box<GraphemeClusterBreakIteratorUtf16<'a>>
pub fn segment_utf16<'a>( &'a self, input: &'a DiplomatStr16, ) -> Box<GraphemeClusterBreakIteratorUtf16<'a>>
Segments a string.
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn segment_latin1<'a>(
&'a self,
input: &'a [u8],
) -> Box<GraphemeClusterBreakIteratorLatin1<'a>>
pub fn segment_latin1<'a>( &'a self, input: &'a [u8], ) -> Box<GraphemeClusterBreakIteratorLatin1<'a>>
Segments a Latin-1 string.
Auto Trait Implementations§
impl Freeze for GraphemeClusterSegmenter
impl RefUnwindSafe for GraphemeClusterSegmenter
impl Send for GraphemeClusterSegmenter
impl Sync for GraphemeClusterSegmenter
impl Unpin for GraphemeClusterSegmenter
impl UnwindSafe for GraphemeClusterSegmenter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more