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
textustringThe text to word wrap
widthintThe width to contain the text to
preserveTrailingSpacesboolIf
true, the wrapped text will keep the trailing spaces. Iffalse, the trailing spaces will be trimmed.tabWidthintThe tab width.
textDirectionTextDirectionThe 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.