Expand description
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§
Functions§
- parse_
bytes - Parses ANSI escape codes from the given text, returning an
Iterator<Item = Match>
.