Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Lines ¶
Lines breaks a string apart into lines; a final newline in the string does not add a blank final line, but two or more final newlines will add one-less-than-count blank lines.
func LongestLineBytes ¶
LongestLineBytes returns the length of the longest virtual line in a string containing embedded newlines, measuring length per StringBytes.
func LongestLineCells ¶
LongestLineCells returns the length of the longest virtual line in a string containing embedded newlines, measuring length per StringCells.
func LongestLineRunes ¶
LongestLineRunes returns the length of the longest virtual line in a string containing embedded newlines, measuring length per StringRunes.
func StringCells ¶
StringCells is an attempt to guess the number of display cells in a fixed-grid terminal window system of cells required for the characters in the string.
It does handle full-width and combining, but doesn't handle wide emojis (at this time).
The implementation of this function is subject to change as we try to get closer.
Types ¶
This section is empty.