Crate dinglebit_terminal
source · [−]Expand description
Utilities for interacting with a terminal.
The most common use for this package is to style a string to output to the terminal.
use dinglebit_terminal::style;
fn main() {
let s = style!("{}, {}!", "Hello", "world")
.black()
.underline()
.to_string();
assert_eq!(s, "\x1b[30;4mHello, world!\x1b[0m");
}
You can apply foreground and background colors as well as various attributes like bold, itlic, underline, etc.
Modules
Constants as defined in ANSI escape code.
Escape Sequence for the terminal.
Apply a style to terminal text using the “Set Graphics Mode” escape sequence.