ansi-str 0.9.0

A library which provides a set of methods to work with ANSI strings
Documentation
1
2
3
4
5
6
7
8
9
10
use ansi_str::AnsiStr;

pub fn main() {
    let text = "\u{1b}[1m\u{1b}[31;46mWhen the night has come\u{1b}[0m\u{1b}[0m";

    let slice = text.ansi_get(5..).expect("ok");

    println!("text={text}");
    println!("slice={slice}");
}