Table of Contents

Method ClipAndJustify

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

ClipAndJustify(ustring, int, TextAlignment, TextDirection)

Justifies text within a specified width.

public static ustring ClipAndJustify(ustring text, int width, TextAlignment talign, TextDirection textDirection = TextDirection.LeftRight_TopBottom)

Parameters

text ustring

The text to justify.

width int

If the text length is greater that width it will be clipped.

talign TextAlignment

Alignment.

textDirection TextDirection

The text direction.

Returns

ustring

Justified and clipped text.

ClipAndJustify(ustring, int, bool, TextDirection)

Justifies text within a specified width.

public static ustring ClipAndJustify(ustring text, int width, bool justify, TextDirection textDirection = TextDirection.LeftRight_TopBottom)

Parameters

text ustring

The text to justify.

width int

If the text length is greater that width it will be clipped.

justify bool

Justify.

textDirection TextDirection

The text direction.

Returns

ustring

Justified and clipped text.