Unstyle

Trait Unstyle 

Source
pub trait Unstyle: Display {
    // Provided methods
    fn unstyle(&self) -> String { ... }
    fn nb_of_lines(&self) -> usize { ... }
}
Expand description

Trait to implement when a string length differs from its unstyled value length (ASCII escapes for instance)

Provided Methods§

Source

fn unstyle(&self) -> String

Returns the same string without the style-related chars/codepoints

Source

fn nb_of_lines(&self) -> usize

Returns the number of lines in the string

Implementations on Foreign Types§

Source§

impl Unstyle for String

Source§

fn unstyle(&self) -> String

Source§

impl Unstyle for ANSIStrings<'_>

Source§

fn unstyle(&self) -> String

Implementors§