Skip to main content

char_width

Function char_width 

Source
pub fn char_width(c: char) -> usize
Expand description

Get the display width of a character

Returns the number of terminal columns needed to display the character:

  • 0 for combining characters and zero-width characters
  • 1 for most ASCII and Latin characters
  • 2 for CJK characters, emojis, and other wide characters