Expand description
§clp – Command Line Printer
clp is a simple utility crate for printing formatted, bordered text blocks
in the terminal using # characters.
It is useful for CLI tools that want to display structured output such as titles, body text, and boxed sections in a readable and visually distinct way.
§Features
- Print a title surrounded by
#borders - Print word-wrapped body text with
#side borders - Print a
#border line - Combine all of the above into a single full “hashtag box”
§Quick Start
clprint::print_hashtag_box("My Title", "This is the body text of my box.", 40);Output:
########################################
# My Title #
########################################
# This is the body text of my box. #
########################################§Usage
Add clp to your Cargo.toml:
[dependencies]
clp = "0.1.0"Then import and use in your project:
use clprint::{print_hashtag_box, print_hashtag_title, print_hashtag_text, print_hashtag_line};
fn main() {
print_hashtag_box("Welcome", "Hello from clp!", 40);
}Functions§
- print_
hashtag_ box - Prints a complete hashtag box with a title, body text, and closing border.
- print_
hashtag_ line - Prints a single
#border line. - print_
hashtag_ table - Prints a formatted table centered on the terminal, framed by
#characters on the left and right edges with space padding between the#and the table. - print_
hashtag_ text - Prints body text with
#side borders, with automatic word wrapping. - print_
hashtag_ title - Prints a title block surrounded by
#border lines.