pub trait EqIgnoreCase {
// Required method
fn eq_ignore_case<S: AsRef<str>>(&self, b: S) -> bool;
}
Expand description
To extend types which implement AsRef<str>
to have a eq_ignore_case
method.
However, it is not recommended to use this trait. Try to wrap your type inside UniCase
by yourself instead.
use unicase::UniCase;
let a = UniCase::new("Maße");
let b = UniCase::new("MASSE");
assert_eq!(a, b);
Required Methods§
Sourcefn eq_ignore_case<S: AsRef<str>>(&self, b: S) -> bool
fn eq_ignore_case<S: AsRef<str>>(&self, b: S) -> bool
Returns true
if the given string slice case-insensitively (using case-folding) matches this string slice.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.