StrExt

Trait StrExt 

Source
pub trait StrExt {
    // Required methods
    fn replace_trailing_spaces(&self, replacement: &str) -> String;
    fn has_trailing_spaces(&self) -> bool;
    fn trailing_spaces(&self) -> usize;
}
Expand description

Trait for string-related extensions

Required Methods§

Source

fn replace_trailing_spaces(&self, replacement: &str) -> String

Replace trailing spaces with a specified replacement string

Source

fn has_trailing_spaces(&self) -> bool

Check if the string has trailing whitespace

Source

fn trailing_spaces(&self) -> usize

Count the number of trailing spaces in the string

Implementations on Foreign Types§

Source§

impl StrExt for str

Implementors§