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
@ -423,7 +423,7 @@ namespace Spectre.Console.Rendering
|
||||
var builder = new StringBuilder();
|
||||
foreach (var character in segment.Text)
|
||||
{
|
||||
var accumulatedCellWidth = builder.ToString().CellLength();
|
||||
var accumulatedCellWidth = builder.ToString().GetCellWidth();
|
||||
if (accumulatedCellWidth >= maxWidth)
|
||||
{
|
||||
break;
|
||||
|
Reference in New Issue
Block a user