pub struct NfcNormalizer;Expand description
NFC normalizer: Canonical Decomposition, followed by Canonical Composition.
Implementations§
Source§impl NfcNormalizer
impl NfcNormalizer
Sourcepub fn quick_check(&self, input: &str) -> IsNormalized
pub fn quick_check(&self, input: &str) -> IsNormalized
Run the NFC quick-check algorithm on input.
Sourcepub fn normalize<'a>(&self, input: &'a str) -> Cow<'a, str>
pub fn normalize<'a>(&self, input: &'a str) -> Cow<'a, str>
Normalize the input string to NFC form.
Returns Cow::Borrowed if the input is already in NFC.
Sourcepub fn normalize_to(&self, input: &str, out: &mut String) -> bool
pub fn normalize_to(&self, input: &str, out: &mut String) -> bool
Normalize the input string to NFC form, appending to out.
Returns true if the input was already normalized (nothing was modified).
Sourcepub fn is_normalized(&self, input: &str) -> bool
pub fn is_normalized(&self, input: &str) -> bool
Check if the input is already in NFC form.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NfcNormalizer
impl RefUnwindSafe for NfcNormalizer
impl Send for NfcNormalizer
impl Sync for NfcNormalizer
impl Unpin for NfcNormalizer
impl UnsafeUnpin for NfcNormalizer
impl UnwindSafe for NfcNormalizer
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