Documentation
¶
Index ¶
- func ExpandTabs(s string) string
- func Fill(output string, width, height int) string
- func HardWrap(line string, width int) []string
- func NormalizeLine(line string, width int) string
- func NormalizeLines(lines []string, width int) []string
- func PreserveBackground(line, bg string) string
- func PreserveBackgroundWidth(line, bg string, width int) string
- func Separator(width, junctionCol int) string
- func WrapLines(text string, width int) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandTabs ¶
ExpandTabs replaces tab characters with four spaces.
func HardWrap ¶
HardWrap splits a single line into multiple rows at width, preserving ANSI escape sequences across the break. Returns the original line in a single-element slice when no wrapping is needed.
func NormalizeLine ¶
NormalizeLine expands tabs, clamps visual width, and pads the line to width.
func NormalizeLines ¶
NormalizeLines applies NormalizeLine to each line.
func PreserveBackground ¶
PreserveBackground wraps a line with a background escape and re-applies it after every embedded SGR sequence so inner ANSI styling does not clear the row background.
func PreserveBackgroundWidth ¶
PreserveBackgroundWidth behaves like PreserveBackground and pads the visible line to the requested terminal width.
Types ¶
This section is empty.