pub struct UniCase<S>(/* private fields */);
Expand description
Case Insensitive wrapper of strings.
Implementations§
Source§impl<S: AsRef<str>> UniCase<S>
impl<S: AsRef<str>> UniCase<S>
Sourcepub fn new(s: S) -> UniCase<S>
pub fn new(s: S) -> UniCase<S>
Creates a new UniCase
.
Note: This scans the text to determine if it is all ASCII or not.
Sourcepub fn to_folded_case(&self) -> String
pub fn to_folded_case(&self) -> String
Returns a copy of this string where each character is mapped to its Unicode CaseFolding equivalent.
§Note
Unicode Case Folding is meant for string storage and matching, not for display.
Source§impl<S> UniCase<S>
impl<S> UniCase<S>
Trait Implementations§
Source§impl<T: AsRef<str>> Ord for UniCase<T>
impl<T: AsRef<str>> Ord for UniCase<T>
Source§impl<T: AsRef<str>> PartialOrd for UniCase<T>
impl<T: AsRef<str>> PartialOrd for UniCase<T>
impl<S: Copy> Copy for UniCase<S>
impl<S: AsRef<str>> Eq for UniCase<S>
Auto Trait Implementations§
impl<S> Freeze for UniCase<S>where
S: Freeze,
impl<S> RefUnwindSafe for UniCase<S>where
S: RefUnwindSafe,
impl<S> Send for UniCase<S>where
S: Send,
impl<S> Sync for UniCase<S>where
S: Sync,
impl<S> Unpin for UniCase<S>where
S: Unpin,
impl<S> UnwindSafe for UniCase<S>where
S: UnwindSafe,
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