Trait std::ascii::AsciiExtExperimental
[-]
[+]
[src]
pub trait AsciiExt<T = Self>: ?Sized { fn is_ascii(&self) -> bool; fn to_ascii_uppercase(&self) -> T; fn to_ascii_lowercase(&self) -> T; fn eq_ignore_ascii_case(&self, other: &Self) -> bool; }
Extension methods for ASCII-subset only operations on string slices
Required Methods
fn is_ascii(&self) -> bool
Check if within the ASCII range.
fn to_ascii_uppercase(&self) -> T
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_lowercase(&self) -> T
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: &Self) -> bool
Check that two strings are an ASCII case-insensitive match.
Same as to_ascii_lowercase(a) == to_ascii_lower(b)
,
but without allocating and copying temporary strings.