Table of Contents

Class StringExtensions

Namespace
Terminal.Gui.Text
Assembly
Terminal.Gui.dll

Extensions to string to support TUI text manipulation.

public static class StringExtensions
Inheritance
StringExtensions
Inherited Members

Methods

DecodeLastRune(string, int)

Unpacks the last UTF-8 encoding in the string.

DecodeRune(string, int, int)

Unpacks the first UTF-8 encoding in the string and returns the rune and its width in bytes.

GetColumns(string, bool)

Gets the number of columns the string occupies in the terminal.

GetRuneCount(string)

Gets the number of runes in the string.

IsAllAsciiDigits(ReadOnlySpan<char>)

Determines if this ReadOnlySpan<T> of char is composed entirely of ASCII digits.

IsAllAsciiHexDigits(ReadOnlySpan<char>)

Determines if this ReadOnlySpan<T> of char is composed entirely of ASCII digits.

IsSurrogatePair(string)

Reports whether a string is a surrogate code point.

MakePrintable(string)

Ensures the text is not a control character and can be displayed by translating characters below 0x20 to equivalent, printable, Unicode chars.

Repeat(string, int)

Repeats the string n times.

ToRuneList(string)

Converts the string into a List<T>.

ToRunes(string)

Converts the string into a Rune array.

ToString(IEnumerable<byte>, Encoding?)

Converts a byte generic collection into a string in the provided encoding (default is UTF8)

ToString(IEnumerable<string>)

Converts a string generic collection into a string.

ToString(IEnumerable<Rune>)

Converts a Rune generic collection into a string.

ToStringList(string)

Converts the string into a List<T>.