clprint
A simple Rust utility crate for printing clean, formatted text blocks in the terminal using # borders.
Features
- Print titles with
#borders - Print word-wrapped body text with
#side borders - Print a full box (title + text + closing border) in one call
- Supports manual line breaks with
\n
Installation
Add clprint to your Cargo.toml:
[]
= "0.1.0"
Usage
Full box
use print_hashtag_box;
Output:
########################################
# Hello #
########################################
# Welcome to clprint! #
########################################
Title only
use print_hashtag_title;
print_hashtag_title;
Output:
########################################
# My Title #
########################################
Body text with word wrapping
use print_hashtag_text;
print_hashtag_text;
Output:
# This is a longer text that #
# will be wrapped #
# automatically. #
Manual line breaks
use print_hashtag_text;
print_hashtag_text;
Output:
# Line one #
# Line two #
# Line three #
Building a box manually
If you need more control, you can use the individual functions:
use ;
print_hashtag_title;
print_hashtag_text;
print_hashtag_text;
print_hashtag_end;
License
MIT