Crates.io | hel-colored |
lib.rs | hel-colored |
version | 0.6.1 |
source | src |
created_at | 2023-02-17 23:27:05.620462 |
updated_at | 2024-07-09 10:38:13.326824 |
description | ANSI string colorizer and styler |
homepage | |
repository | https://github.com/Hellaeh/hel-colored.git |
max_upload_size | |
id | 787854 |
size | 66,112 |
ANSI string colorizer and styler
to_string
called)"Hello World!".bold().blue().underline();
cargo add hel-colored -F nested
let blue_text: ANSIString<&str> = "blue text".blue();
let green_blue_green_text: ANSIString<String> = format!("Green {blue_text} wrapping").green();
// Better to call `to_string` above
println!("{green_blue_green_text}");
let builder: ANSIStringBuilder = ANSIStringBuilder::new().bold().underline().orange();
let str1 = builder.build("Hello");
let str2 = builder.build("World!");
println!("{str1}, {str2}")
cargo add hel-colored