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§
Sourcefn replace_trailing_spaces(&self, replacement: &str) -> String
fn replace_trailing_spaces(&self, replacement: &str) -> String
Replace trailing spaces with a specified replacement string
Sourcefn has_trailing_spaces(&self) -> bool
fn has_trailing_spaces(&self) -> bool
Check if the string has trailing whitespace
Sourcefn trailing_spaces(&self) -> usize
fn trailing_spaces(&self) -> usize
Count the number of trailing spaces in the string