Skip to main content

StringExt

Trait StringExt 

Source
pub trait StringExt {
    // Required methods
    fn is_lowercase(&self) -> bool;
    fn starts_with_lowercase(&self) -> bool;
    fn to_lowercase_first(&self) -> String;
    fn to_uppercase_first(&self) -> String;
}
Expand description

Additional methods for strings

Required Methods§

Source

fn is_lowercase(&self) -> bool

Checks if the string is all lowercase

Source

fn starts_with_lowercase(&self) -> bool

Checks if a string starts with a lowercase character

Source

fn to_lowercase_first(&self) -> String

Returns a new string starting with a first character in lowercase

Source

fn to_uppercase_first(&self) -> String

Returns a new string starting with a first character in uppercase

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StringExt for str

Implementors§