This crate implements the ECMA-48 standard for coded characters in rust.
Various constructions are provided to easily add control character and sequences inside text. This crate is compatible with "ANSI terminals".
This crate does not use a concept of "styles" or any kind of abstraction other than ones defined in the standard.
- ecma-48 - Control Functions for Coded Character Sets
use coded_chars::clear_screen;use coded_chars::cursor::set_position;use coded_chars::presentation::{format_str, select_graphic};fnmain(){// Direct formatprintln!("Hello {}World{}!", select_graphic().fg_red().bold().underline(), select_graphic().default());// Clear screenclear_screen();// Using format_strlet fmt_world = format_str("World",select_graphic().fg_red().bold().underline());println!("Hello {fmt_world}!");set_position(5,1).exec();println!("This line is printed on the fifth line.");}This crate development is achieved.
Contact the author at dev@trehinos.eu.
© 2024 Sébastien Geldreich
MIT License
