Removes common leading whitespace from each line.
disable raw mode
disable raw mode on stdin (no external dependencies)
divider
prints a divider as per max width
divider_vibrant
prints a divider with vibrant colors
e.g. divider_vibrant()
─────────────────────────────────────────────────────────────────
enable raw mode
enable raw mode on stdin (no external dependencies)
Fill a line of text at a given width.
Fill text
in-place without reallocating the input string.
get_max_width
Indent each line by the given prefix.
print_framed
prints the provided text in a frame of x,y,w,h
e.g. print_framed(0,0,10,10,"hello world")
prints “hello world” in a frame at the provided position
automatically wraps the text to fit the width of the frame
print_positioned
prints the provided text at the provided position
offseted by the provided x and y values from the current position
x and y can be negative to move the cursor to the left or up
e.g. print_positioned(0,0,"hello world")
prints “hello world” at the current position
Refill a paragraph of wrapped text with a new width.
set_max_width
Unpack a paragraph of already-wrapped text.
Wrap a line of text at a given width.
Wrap text into columns with a given total width.