Table of Contents

Method Justify

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Justify(ustring, int, char, TextDirection)

Justifies the text to fill the width provided. Space will be added between words (demarked by spaces and tabs) to make the text just fit width. Spaces will not be added to the ends.

public static ustring Justify(ustring text, int width, char spaceChar = ' ', TextDirection textDirection = TextDirection.LeftRight_TopBottom)

Parameters

text ustring
width int
spaceChar char

Character to replace whitespace and pad with. For debugging purposes.

textDirection TextDirection

The text direction.

Returns

ustring

The justified text.