Crate parse_ansi[][src]

Parse ANSI escape codes (colors, underlines, etc.)

extern crate parse_ansi;

assert_eq!(
    parse_ansi::ANSI_REGEX.replace_all(
        b"Hello, \x1b[42mworld\x1b[0m!",
        b"" as &[u8],
    ),
    b"Hello, world!" as &[u8],
);

Structs

ANSI_REGEX

A Regex that matches ANSI escape codes.

Constants

ANSI_RE

Functions

parse_bytes

Parses ANSI escape codes from the given text, returning an Iterator<Item = Match>.