Skip to main content

cell_width

Function cell_width 

Source
pub fn cell_width(text: &str) -> usize
Expand description

Cells text takes when a table cell draws it, grapheme by grapheme at ratatui’s own widths. Unlike display_width, an emoji sequence joined into one grapheme counts once, and control characters count nothing, because ratatui draws nothing for them.