Files
spectre.console/src/Spectre.Console/Extensions/CharExtensions.cs
Patrik Svensson 54be64ec84 Add JSON text renderer (#1086)
* Add JsonText widget to render highlighted JSON

Closes #1051
2022-12-31 18:17:15 +00:00

17 lines
493 B
C#

namespace Spectre.Console;
/// <summary>
/// Contains extension methods for <see cref="char"/>.
/// </summary>
public static partial class CharExtensions
{
/// <summary>
/// Gets the cell width of a character.
/// </summary>
/// <param name="character">The character to get the cell width of.</param>
/// <returns>The cell width of the character.</returns>
public static int GetCellWidth(this char character)
{
return Cell.GetCellLength(character);
}
}