std.utf.cell_len

std.utf

cell_len(str) -> width

Return the display width of a string in terminal cells, accounting for text sizing

Calculates the cell width of a string that may contain Kitty text sizing (OSC 66) sequences. Delegates to std.core.cell_len when available, otherwise falls back to a pure-Lua implementation.