Method GetWidestLineLength
GetWidestLineLength(string, int)
Returns the number of columns in the widest line in the text, without word wrap, accounting for wide-glyphs
(uses GetColumns(string)). text
if it contains newlines.
public static int GetWidestLineLength(string text, int tabWidth = 0)
Parameters
Returns
- int
The length of the longest line.
Remarks
This API will return incorrect results if the text includes glyphs whose width is dependent on surrounding glyphs (e.g. Arabic).