noansi 0.1.0

Strip ANSI codes from strings.
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 4.44 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 352.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ErisianArchitect/noansi
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ErisianArchitect

A very simple library (63 lines) for displaying ANSI text without the escape sequences.

Only one dependency: vte

use noansi::Noansi;

fn main() {
    let ansi_string = "\x1b[38;2;255;0;0mRed Text\x1b[0m";
    println!("{}", ansi_string);
    println!("{}", Noansi(&ansi_string));
    let no_ansi_string = Noansi(ansi_string).to_string();
    println!("{}", no_ansi_string);
}