Module OpamStd.FormatSource
Querying information
Returns the length of the string in terminal chars, ignoring ANSI color sequences from OpamConsole.colorise
Text formatting functions
Truncates the string to not visually get over width columns
left indenting. ~visual can be used to indent eg. ANSI colored strings and should correspond to the visible characters of s
Pads fields in a table with spaces for alignment.
Cut long lines in string according to the terminal width
Convert a list of items to string as a dashed list (already reformats supposes no additional left margin: don't use within OpamConsole.error or similar)
Display a pretty list: "x";"y";"z" -> "x, y and z". "and" can be changed by specifying last
Splits a list of strings so that it can be printed as a table that should fit on screen