Method Justify
Justify(string, int, char, TextDirection, int)
Justifies the text to fill the width provided. Space will be added between words to make the text just fit
width. Spaces will not be added to the start or end.
public static string Justify(string text, int width, char spaceChar = ' ', TextDirection textDirection = TextDirection.LeftRight_TopBottom, int tabWidth = 0)
Parameters
textstringwidthintspaceCharcharCharacter to replace whitespace and pad with. For debugging purposes.
textDirectionTextDirectionThe text direction.
tabWidthintThe number of columns used for a tab.
Returns
- string
The justified text.