Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTextOffset ¶
GetTextOffset calculates how many rows and columns a string takes on a terminal.
`startColumn` specifies the column that the string starts to print out. `wrapColumn` specified the number of columns that the terminal has.
The algorithm takes care of East Asian characters which takes 2 columns to display, and inserts a single space at the end of each row when necessary.
To disable text wrapping, specify `wrapColumn = 0`. In this mode, “\v` and `\f` behave as if the line is infinity in length.
However, this function does not support Middle East languages requiring special BiDi shaping algorithms.
func GetTextWidth ¶
GetTextWidth calculates how many columns a string takes on a terminal.
`startColumn` specifies the column that the string starts to print out. `wrapColumn` specified the number of columns that the terminal has.
The algorithm takes care of East Asian characters which takes 2 columns to display, and inserts a single space at the end of each row when necessary.
To disable text wrapping, specify `wrapColumn = 0`. In this mode, `\n`, `\v`, and `\f` will behave as a normal space.
However, this function does not support Middle East languages requiring special BiDi shaping algorithms.
Types ¶
This section is empty.