Class ConsoleChar
Console character manipulation routines
Inheritance
Namespace
Syntax
public static class ConsoleChar
Methods
EstimateCellWidth(string)
Estimates the cell width (how many cells a string takes up)
Returns
Length of the string by character widths (a.k.a. how many cells this sentence takes up)
Declaration
public static int EstimateCellWidth(string sentence)
Parameters
| Name | Type | Description |
|---|---|---|
| sentence | string | A sentence to process |
EstimateCellWidth(string, int, bool)
Estimates the cell width (how many cells a string takes up) of a character
Returns
Length of a character by character widths (a.k.a. how many cells this sentence takes up), or -1 if empty
Declaration
public static int EstimateCellWidth(string sentence, int index, bool processed = false)
Parameters
| Name | Type | Description |
|---|---|---|
| sentence | string | A sentence to process |
| index | int | Index of a character within a sentence |
| processed | bool | Whether to process the sentence
|
EstimateFullWidths(string)
Estimates the amount of zero-width characters
Returns
The amount of zero-width characters that this sentence contains
Declaration
public static int EstimateFullWidths(string sentence)
Parameters
| Name | Type | Description |
|---|---|---|
| sentence | string | A sentence to process |
EstimateZeroWidths(string)
Estimates the amount of zero-width characters
Returns
The amount of zero-width characters that this sentence contains
Declaration
public static int EstimateZeroWidths(string sentence)
Parameters
| Name | Type | Description |
|---|---|---|
| sentence | string | A sentence to process |
GetWideChars(string)
Gets a list of wide characters from a sentence
Returns
Wide character instances
Declaration
public static WideChar[] GetWideChars(string sentence)
Parameters
| Name | Type | Description |
|---|---|---|
| sentence | string | Sentence to form |
GetWidth(WideChar)
Gets the cell width for this character
Returns
Width of the character
Declaration
public static int GetWidth(this WideChar wideChar)
Parameters
| Name | Type | Description |
|---|---|---|
| wideChar | WideChar |