pub trait ToCase<T> {
fn to_upper(&self) -> FlexStr<T>;
fn to_lower(&self) -> FlexStr<T>;
fn to_ascii_upper(&self) -> FlexStr<T>;
fn to_ascii_lower(&self) -> FlexStr<T>;
}Expand description
Trait that provides uppercase/lowercase conversion functions for FlexStr
Required methods
fn to_ascii_upper(&self) -> FlexStr<T>
fn to_ascii_upper(&self) -> FlexStr<T>
Converts string to ASCII uppercase and returns a FlexStr
fn to_ascii_lower(&self) -> FlexStr<T>
fn to_ascii_lower(&self) -> FlexStr<T>
Converts string to ASCII lowercase and returns a FlexStr
Implementations on Foreign Types
sourceimpl<T> ToCase<T> for str where
T: From<String> + for<'a> From<&'a str>,
impl<T> ToCase<T> for str where
T: From<String> + for<'a> From<&'a str>,
sourcefn to_upper(&self) -> FlexStr<T>
fn to_upper(&self) -> FlexStr<T>
use flexstr::{FlexStr, ToCase};
let a: FlexStr = "test".to_upper();
assert_eq!(a, "TEST");sourcefn to_lower(&self) -> FlexStr<T>
fn to_lower(&self) -> FlexStr<T>
use flexstr::{FlexStr, ToCase};
let a: FlexStr = "TEST".to_lower();
assert_eq!(a, "test");sourcefn to_ascii_upper(&self) -> FlexStr<T>
fn to_ascii_upper(&self) -> FlexStr<T>
use flexstr::{FlexStr, ToCase};
let a: FlexStr = "test".to_ascii_upper();
assert_eq!(a, "TEST");sourcefn to_ascii_lower(&self) -> FlexStr<T>
fn to_ascii_lower(&self) -> FlexStr<T>
use flexstr::{FlexStr, ToCase};
let a: FlexStr = "TEST".to_ascii_lower();
assert_eq!(a, "test");