diff --git a/src/Spectre.Console/Extensions/CharExtensions.cs b/src/Spectre.Console/Extensions/CharExtensions.cs new file mode 100644 index 0000000..44b7c9f --- /dev/null +++ b/src/Spectre.Console/Extensions/CharExtensions.cs @@ -0,0 +1,18 @@ +namespace Spectre.Console +{ + /// + /// Contains extension methods for . + /// + public static class CharExtensions + { + /// + /// Gets the cell width of a character. + /// + /// The character to get the cell width of. + /// The cell width of the character. + public static int GetCellWidth(this char character) + { + return Cell.GetCellLength(character); + } + } +}