Search Results for

    Class ConsoleChar

    Console character manipulation routines

    Inheritance
    object
    ConsoleChar
    Namespace
    Terminaux.Base.Extensions @ Terminaux.dll
    Syntax
    public static class ConsoleChar


    Methods

    EstimateCellWidth(string)

    Estimates the cell width (how many cells a string takes up)

    Returns
    int

    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
    int

    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

    (WARNING: Indexes WILL change if there ARE VT sequences in the sentence! Carefully choose a value!)

    EstimateFullWidths(string)

    Estimates the amount of zero-width characters

    Returns
    int

    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
    int

    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
    WideChar[]

    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
    int

    Width of the character

    Declaration
    public static int GetWidth(this WideChar wideChar)
    Parameters
    Name Type Description
    wideChar WideChar
    Show / Hide Table of Contents

    Table of contents



      About

      Copyright © 2014-2026 Aptivi

      Find us

    •  
    •  
    •  
    •  
    •  
    •  
    • Social media

    •  
    •  
    •  
    •