ltpp-output 3.0.0

An atomic output library based on Rust that supports output functionalities through functions, builders, and other methods. It allows customization of text and background colors.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::r#type::Text;
use crate::*;

#[test]
fn test_text() {
    let text_default: Text<'_> = Text::default();
    let text_default_str: &String = &text_default.get_display_str_cow().into_owned();
    let text: Text<'_> = Text {
        text: "",
        text_color: ColorType::default(),
        text_bg_color: ColorType::default(),
        blod: false,
        endl: false,
    };
    let text_str: &String = &text.get_display_str_cow().into_owned();
    assert_eq!(text_default_str, text_str);
}