Struct icu_capi::normalizer::ffi::ComposingNormalizer
source · pub struct ComposingNormalizer(pub ComposingNormalizer);
Tuple Fields§
§0: ComposingNormalizer
Implementations§
source§impl ComposingNormalizer
impl ComposingNormalizer
sourcepub fn create_nfc() -> Box<ComposingNormalizer>
pub fn create_nfc() -> Box<ComposingNormalizer>
Construct a new ComposingNormalizer instance for NFC using compiled data.
sourcepub fn create_nfc_with_provider(
provider: &DataProvider,
) -> Result<Box<ComposingNormalizer>, DataError>
pub fn create_nfc_with_provider( provider: &DataProvider, ) -> Result<Box<ComposingNormalizer>, DataError>
Construct a new ComposingNormalizer instance for NFC using a particular data source.
sourcepub fn create_nfkc() -> Box<ComposingNormalizer>
pub fn create_nfkc() -> Box<ComposingNormalizer>
Construct a new ComposingNormalizer instance for NFKC using compiled data.
sourcepub fn create_nfkc_with_provider(
provider: &DataProvider,
) -> Result<Box<ComposingNormalizer>, DataError>
pub fn create_nfkc_with_provider( provider: &DataProvider, ) -> Result<Box<ComposingNormalizer>, DataError>
Construct a new ComposingNormalizer instance for NFKC using a particular data source.
sourcepub fn normalize(&self, s: &DiplomatStr, write: &mut DiplomatWrite)
pub fn normalize(&self, s: &DiplomatStr, write: &mut DiplomatWrite)
Normalize a string
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn is_normalized_utf8(&self, s: &DiplomatStr) -> bool
pub fn is_normalized_utf8(&self, s: &DiplomatStr) -> bool
Check if a string is normalized
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn is_normalized_utf16(&self, s: &DiplomatStr16) -> bool
pub fn is_normalized_utf16(&self, s: &DiplomatStr16) -> bool
Check if a string is normalized
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn is_normalized_utf8_up_to(&self, s: &DiplomatStr) -> usize
pub fn is_normalized_utf8_up_to(&self, s: &DiplomatStr) -> usize
Return the index a slice of potentially-invalid UTF-8 is normalized up to
sourcepub fn is_normalized_utf16_up_to(&self, s: &DiplomatStr16) -> usize
pub fn is_normalized_utf16_up_to(&self, s: &DiplomatStr16) -> usize
Return the index a slice of potentially-invalid UTF-8 is normalized up to
Auto Trait Implementations§
impl Freeze for ComposingNormalizer
impl RefUnwindSafe for ComposingNormalizer
impl Send for ComposingNormalizer
impl Sync for ComposingNormalizer
impl Unpin for ComposingNormalizer
impl UnwindSafe for ComposingNormalizer
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
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>
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>
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