package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Aug 17, 2026
License: GPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package width approximates terminal cell widths. Its table covers common East Asian, Hangul, and
emoji ranges and must be updated as Unicode grows.
Cut returns the longest prefix that fits and its cell width.
Of is how many cells text takes up.
Rune is how many cells one character takes up.
Wrap breaks styled text into rows no wider than cells, preferring spaces. ANSI escapes take no
cells, and their styling continues across breaks.
Row maps rendered text to source runes. Text may carry ANSI state across the break; [End, Next)
is discarded break whitespace.
Rows wraps as Wrap does, and says which runes of the input each row came from. There is always at
least one row.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.