Trait std::ascii::StrAsciiExt[src]
pub trait StrAsciiExt {
fn to_ascii_upper(&self) -> String;
fn to_ascii_lower(&self) -> String;
fn eq_ignore_ascii_case(&self, other: &str) -> bool;
}Extension methods for ASCII-subset only operations on string slices
Required Methods
fn to_ascii_upper(&self) -> String
Makes a copy of the string in ASCII upper case: ASCII letters 'a' to 'z' are mapped to 'A' to 'Z', but non-ASCII letters are unchanged.
fn to_ascii_lower(&self) -> String
Makes a copy of the string in ASCII lower case: ASCII letters 'A' to 'Z' are mapped to 'a' to 'z', but non-ASCII letters are unchanged.
fn eq_ignore_ascii_case(&self, other: &str) -> bool
Check that two strings are an ASCII case-insensitive match.
Same as to_ascii_lower(a) == to_ascii_lower(b),
but without allocating and copying temporary strings.
Implementors
impl<'a> StrAsciiExt for &'a str