pub trait ToCase<const N: usize, T> {
    fn to_upper(&self) -> FlexStr<N, T>;
fn to_lower(&self) -> FlexStr<N, T>;
fn to_ascii_upper(&self) -> FlexStr<N, T>;
fn to_ascii_lower(&self) -> FlexStr<N, T>; }
Expand description

Trait that provides uppercase/lowercase conversion functions for FlexStr

Required methods

Converts string to uppercase and returns a FlexStr

Converts string to lowercase and returns a FlexStr

Converts string to ASCII uppercase and returns a FlexStr

Converts string to ASCII lowercase and returns a FlexStr

Implementations on Foreign Types

use flexstr::{FlexStr, ToCase};

let a: FlexStr = "test".to_upper();
assert_eq!(a, "TEST");
use flexstr::{FlexStr, ToCase};

let a: FlexStr = "TEST".to_lower();
assert_eq!(a, "test");
use flexstr::{FlexStr, ToCase};

let a: FlexStr = "test".to_ascii_upper();
assert_eq!(a, "TEST");
use flexstr::{FlexStr, ToCase};

let a: FlexStr = "TEST".to_ascii_lower();
assert_eq!(a, "test");

Implementors