Method GetLengthThatFits | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
GetLengthThatFits(string, int, int, TextDirection)
Gets the number of the Runes in the text that will fit in width
.
public static int GetLengthThatFits(string text, int width, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom)
Parameters
text
string
The text.
width
int
The width.
tabWidth
int
The width used for a tab.
textDirection
TextDirection
The text direction.
Returns
The index of the text that fit the width.
GetLengthThatFits(List, int, int, TextDirection)
Gets the number of the Runes in a list of Runes that will fit in width
.
public static int GetLengthThatFits(List<Rune> runes, int width, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom)
Parameters
The list of runes.
width
int
The width.
tabWidth
int
The width used for a tab.
textDirection
TextDirection
The text direction.
Returns
The index of the last Rune in runes
that fit in width
.