Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Crop ¶
Crop ensures that the supplied text is cropped to the target length. If it exceeds the target length, the last (max) 3 characters are replaced with ellipsis. Returned are the cropped string, and the final visible length after cropping.
func Measure ¶
Measure returns the number of horizonal space the provided text accounts for. This will filter out escape characters, and treat multi-byte unicode characters as single space tenants.
func PadRight ¶
PadRight pads text to the right, cropping anything over the supplied maxLength, preserving up to n gutter chars on the right.
func StripTerminalEscapeSequences ¶ added in v0.2.3
StripTerminalEscapeSequences removes all terminal escape sequences from the provided string, and returns the remaining string
Types ¶
This section is empty.