Skip to content

Class TextLayout

Breaks text into the lines it is drawn as. Widths are in cells, so a wide character counts two and a combining mark none.

Declaration
public static class TextLayout

Break(string, int, TextWrap, List<string>)

Section titled “Break(string, int, TextWrap, List<string>)”

Adds the lines of a text to a list: one for each line feed, and more where a line wraps to a width. A width of zero or less, or TextWrap.None, wraps nothing.

Declaration
public static void Break(string text, int width, TextWrap wrap, List<string> lines)
Type Name
System.String text
System.Int32 width
DarkEffekt.Terminal.UI.TextWrap wrap
System.Collections.Generic.List<System.String> lines

The cells a text takes when broken to a width: its widest line, and its lines.

Declaration
public static CellSize Measure(string text, int width, TextWrap wrap)

DarkEffekt.Terminal.UI.CellSize

Type Name
System.String text
System.Int32 width
DarkEffekt.Terminal.UI.TextWrap wrap