pub struct NfkdNormalizer;Expand description
NFKD normalizer: Compatibility Decomposition.
Implementations§
Source§impl NfkdNormalizer
impl NfkdNormalizer
Sourcepub fn quick_check(&self, input: &str) -> IsNormalized
pub fn quick_check(&self, input: &str) -> IsNormalized
Run the NFKD 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 NFKD form.
Returns Cow::Borrowed if the input is already in NFKD.
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 NFKD 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 NFKD form.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NfkdNormalizer
impl RefUnwindSafe for NfkdNormalizer
impl Send for NfkdNormalizer
impl Sync for NfkdNormalizer
impl Unpin for NfkdNormalizer
impl UnsafeUnpin for NfkdNormalizer
impl UnwindSafe for NfkdNormalizer
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