mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Expose extension method that gets the cell width of text
This commit is contained in:

committed by
Patrik Svensson

parent
48d49d6e18
commit
8cfe06e77a
@ -59,7 +59,12 @@ namespace Spectre.Console
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
internal static int CellLength(this string text)
|
||||
/// <summary>
|
||||
/// Gets the cell width of the specified text.
|
||||
/// </summary>
|
||||
/// <param name="text">The text to get the cell width of.</param>
|
||||
/// <returns>The cell width of the text.</returns>
|
||||
public static int GetCellWidth(this string text)
|
||||
{
|
||||
return Cell.GetCellLength(text);
|
||||
}
|
||||
|
Reference in New Issue
Block a user