[][src]Crate dinglebit_terminal

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

consts

Constants as defined in ANSI escape code.

escape_sequence

Escape Sequence for the terminal.

style

Apply a style to terminal text using the "Set Graphics Mode" escape sequence.

Macros

reset

Create a reset escape sequence for the graphics mode.

sgm

Create a SetGraphicsMode using the given vector.

style

format! the given values and create a Style that can then be used to style the text.