std.utf.display_len

std.utf

display_len(str) -> width

Return the display width of a plain string in terminal cells

Calculates the display width of a string in terminal cells (monospace font units). This is the width as it would appear on screen.