Skip to main content

cell_width_at

Function cell_width_at 

Source
pub fn cell_width_at(
    ch: char,
    cell_offset_in_line: usize,
    tab_width: usize,
) -> usize
Expand description

Calculate visual width (in cells) for a character at a specific cell offset within the line.

Notes:

  • For most characters, width follows UAX #11 via char_width.
  • For '\t', width advances to the next tab stop based on tab_width.