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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)