Method WordWrap | Terminal.Gui v1 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
WordWrap(ustring, int, bool, int, TextDirection)
Formats the provided text to fit within the width provided using word wrapping.
public static List<ustring> WordWrap(ustring text, int width, bool preserveTrailingSpaces = false, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom)
Parameters
text
ustring
The text to word wrap
width
int
The width to contain the text to
preserveTrailingSpaces
bool
If true
, the wrapped text will keep the trailing spaces. If false
, the trailing spaces will be trimmed.
tabWidth
int
The tab width.
textDirection
TextDirection
The text direction.
Returns
List<ustring>
Returns a list of word wrapped lines.