Method WordWrap
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
ustringThe text to word wrap
width
intThe width to contain the text to
preserveTrailingSpaces
boolIf
true
, the wrapped text will keep the trailing spaces. Iffalse
, the trailing spaces will be trimmed.tabWidth
intThe tab width.
textDirection
TextDirectionThe text direction.
Returns
- List<ustring>
Returns a list of word wrapped lines.
Remarks
This method does not do any justification.
This method strips Newline ('\n' and '\r\n') sequences before processing.