fn escape_esc_character(&self, escape_sequence: String) -> String {
        const ASCII_ESC_KEY_CODE: &str = "\u{1b}";
        match self {
            EscapeStyle::UnicodeRust => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\u{1b}"),
            EscapeStyle::Unicode => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\u001b"),
            EscapeStyle::Bash => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\e"),
            EscapeStyle::Hex => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\x1b"),
        }
    }
/// When we get the escape sequence from `ansi_term` it directly contains the ASCII value
/// of `ESC`. Normally we don't want this but an escaped version of the `ESC`-later using
/// regular characters.
When we get the escape sequence from `ansi_term` it directly contains the ASCII value
of `ESC`. Normally we don't want this but an escaped version of the `ESC`-later using
regular characters.
When we get the escape sequence from ` ansi_term ` it directly contains the ASCII value of ` ESC ` . Normally we don ' t want this but an escaped version of the ` ESC ` - later using regular characters .
fn escape_esc_character(&self, escape_sequence: String) -> String {
        const ASCII_ESC_KEY_CODE: &str = "\u{1b}";
        match self {
            EscapeStyle::UnicodeRust => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\u{1b}"),
            EscapeStyle::Unicode => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\u001b"),
            EscapeStyle::Bash => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\e"),
            EscapeStyle::Hex => escape_sequence.replace(ASCII_ESC_KEY_CODE, "\\x1b"),
        }
    }
fn escape_esc_character ( & self , escape_sequence : String ) -> String { const ASCII_ESC_KEY_CODE : & str = " \u{1b} " ; match self { EscapeStyle :: UnicodeRust => escape_sequence . replace ( ASCII_ESC_KEY_CODE , " \\ " ) , EscapeStyle :: Unicode => escape_sequence . replace ( ASCII_ESC_KEY_CODE , " \\ " ) , EscapeStyle :: Bash => escape_sequence . replace ( ASCII_ESC_KEY_CODE , " \\ " ) , EscapeStyle :: Hex => escape_sequence . replace ( ASCII_ESC_KEY_CODE , " \\ " ) , } }
When we get the escape sequence from `ansi_term` it directly contains the ASCII value
of `ESC`.
When we get the escape sequence from ` ansi_term ` it directly contains the ASCII value of ` ESC ` .
&self
escape_sequence
String