Skip to main content

StrExt

Trait StrExt 

Source
pub(crate) trait StrExt {
    // Required methods
    fn escape_markup(&self) -> String;
    fn collapse_whitespaces(&self, trim_start: bool, trim_end: bool) -> String;
}
Expand description

Common extensions to strings.

Required Methods§

Source

fn escape_markup(&self) -> String

Escape markup for compatibility with Pango.

Source

fn collapse_whitespaces(&self, trim_start: bool, trim_end: bool) -> String

Collapse contiguous whitespaces in this string into a single space.

Implementors§

Source§

impl<T> StrExt for T
where T: AsRef<str>,