Table of Contents

Method GetColumns

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

GetColumns(string, bool)

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

public static int GetColumns(this string str, bool ignoreLessThanZero = true)

Parameters

str string

The string to measure.

ignoreLessThanZero bool

Indicates whether to ignore values ​​less than zero, such as control keys.

Returns

int

Remarks

This is a Terminal.Gui extension method to string to support TUI text manipulation.