pub struct UnicodeUtils;Expand description
Unicode handling utilities
Implementations§
Source§impl UnicodeUtils
impl UnicodeUtils
Sourcepub fn simple_normalize(text: &str) -> String
pub fn simple_normalize(text: &str) -> String
Normalize unicode text (simple normalization)
Sourcepub fn remove_diacritics(text: &str) -> String
pub fn remove_diacritics(text: &str) -> String
Remove diacritics (accents) from text
Sourcepub fn has_non_ascii(text: &str) -> bool
pub fn has_non_ascii(text: &str) -> bool
Check if text contains non-ASCII characters
Sourcepub fn char_count(text: &str) -> usize
pub fn char_count(text: &str) -> usize
Count unicode characters (not bytes)
Sourcepub fn analyze_text(text: &str) -> TextAnalysis
pub fn analyze_text(text: &str) -> TextAnalysis
Get unicode character categories
Auto Trait Implementations§
impl Freeze for UnicodeUtils
impl RefUnwindSafe for UnicodeUtils
impl Send for UnicodeUtils
impl Sync for UnicodeUtils
impl Unpin for UnicodeUtils
impl UnwindSafe for UnicodeUtils
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