Trait irc_proto::colors::FormattedStringExt
source · 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§
sourcefn is_formatted(&self) -> bool
fn is_formatted(&self) -> bool
Returns true if the string contains color, bold, underline or italics
sourcefn strip_formatting(self) -> Cow<'a, str>
fn strip_formatting(self) -> Cow<'a, str>
Returns the string with all color, bold, underline and italics stripped