Method GetMaxColsForWidth
GetMaxColsForWidth(List<string>, int, int)
Gets the index position from the list based on the width
.
public static int GetMaxColsForWidth(List<string> lines, int width, int tabWidth = 0)
Parameters
lines
List<string>The lines.
width
intThe width.
tabWidth
intThe number of columns used for a tab.
Returns
- int
The index of the list that fit the width.
Remarks
This API will return incorrect results if the text includes glyphs whose width is dependent on surrounding glyphs (e.g. Arabic).