# 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`:
```toml
[dependencies]
clprint = "0.1.0"
```
---
## Usage
### Full box
```rust
use clprint::print_hashtag_box;
fn main() {
print_hashtag_box("Hello", "Welcome to clprint!", 40);
}
```
Output:
```
########################################
# Hello #
########################################
# Welcome to clprint! #
########################################
```
---
### Title only
```rust
use clprint::print_hashtag_title;
print_hashtag_title("My Title", 40);
```
Output:
```
########################################
# My Title #
########################################
```
---
### Body text with word wrapping
```rust
use clprint::print_hashtag_text;
print_hashtag_text("This is a longer text that will be wrapped automatically.", 30);
```
Output:
```
# This is a longer text that #
# will be wrapped #
# automatically. #
```
---
### Manual line breaks
```rust
use clprint::print_hashtag_text;
print_hashtag_text("Line one\nLine two\nLine three", 30);
```
Output:
```
# Line one #
# Line two #
# Line three #
```
---
### Building a box manually
If you need more control, you can use the individual functions:
```rust
use clprint::{print_hashtag_title, print_hashtag_text, print_hashtag_line};
print_hashtag_title("Warning", 40);
print_hashtag_text("Something went wrong. Please check your input.", 40);
print_hashtag_text("Contact support if the issue persists.", 40);
print_hashtag_line(40);
```
---
## License
MIT