Crate ansi_cut[][src]

Expand description

Ansi-cut

A library for cutting a string while preserving colors.

Example

use ansi_cut::AnsiCut;
use owo_colors::{colors::*, OwoColorize};

let colored_text = "When the night has come"
    .fg::<Black>()
    .bg::<White>()
    .to_string();

let cutted_text = colored_text.cut(5..);

println!("{}", cutted_text);

Traits

AnsiCut a trait for a cut string while keeping information about its color

Functions