Table of Contents

Class Text

Namespace
MiniTui
Assembly
MiniTui.dll

Multi-line styled text.

public sealed record Text : IEquatable<Text>
Inheritance
Text
Implements
Inherited Members

Constructors

Text(IReadOnlyList<Line>)

Multi-line styled text.

public Text(IReadOnlyList<Line> Lines)

Parameters

Lines IReadOnlyList<Line>

The lines, top to bottom.

Properties

Height

The number of lines.

public int Height { get; }

Property Value

int

Lines

The lines, top to bottom.

public IReadOnlyList<Line> Lines { get; init; }

Property Value

IReadOnlyList<Line>

Width

The widest line's width in columns.

public int Width { get; }

Property Value

int

Methods

From(string)

Split a string into unstyled lines on \n and \r\n.

public static Text From(string s)

Parameters

s string

Returns

Text

Operators

implicit operator Text(Line)

Text with a single line.

public static implicit operator Text(Line line)

Parameters

line Line

Returns

Text

implicit operator Text(string)

Split a string into unstyled lines.

public static implicit operator Text(string s)

Parameters

s string

Returns

Text