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
- linesList<string>
- The lines. 
- widthint
- The width. 
- tabWidthint
- The 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).