Method ClipAndJustify | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
ClipAndJustify(string, int, Alignment, TextDirection, int, TextFormatter?)
Justifies text within a specified width.
public static string ClipAndJustify(string text, int width, Alignment textAlignment, TextDirection textDirection = TextDirection.LeftRight_TopBottom, int tabWidth = 0, TextFormatter? textFormatter = null)
Parameters
text
string
The text to justify.
width
int
The number of columns to clip the text to. Text longer than width
will be clipped.
textAlignment
Alignment
Alignment.
textDirection
TextDirection
The text direction.
tabWidth
int
The number of columns used for a tab.
textFormatter
TextFormatter
TextFormatter instance to access any of his objects.
Returns
Justified and clipped text.
ClipAndJustify(string, int, bool, TextDirection, int, TextFormatter?)
Justifies text within a specified width.
public static string ClipAndJustify(string text, int width, bool justify, TextDirection textDirection = TextDirection.LeftRight_TopBottom, int tabWidth = 0, TextFormatter? textFormatter = null)
Parameters
text
string
The text to justify.
width
int
The number of columns to clip the text to. Text longer than width
will be clipped.
justify
bool
Justify.
textDirection
TextDirection
The text direction.
tabWidth
int
The number of columns used for a tab.
textFormatter
TextFormatter
TextFormatter instance to access any of his objects.
Returns
Justified and clipped text.