pub trait FormattedStringExt<'a> {
    // Required methods
    fn is_formatted(&self) -> bool;
    fn strip_formatting(self) -> Cow<'a, str>;
}
Expand description

An extension trait giving strings a function to strip IRC colors

Required Methods§

source

fn is_formatted(&self) -> bool

Returns true if the string contains color, bold, underline or italics

source

fn strip_formatting(self) -> Cow<'a, str>

Returns the string with all color, bold, underline and italics stripped

Implementations on Foreign Types§

source§

impl FormattedStringExt<'static> for String

source§

fn is_formatted(&self) -> bool

source§

fn strip_formatting(self) -> Cow<'static, str>

source§

impl<'a> FormattedStringExt<'a> for &'a str

Implementors§