Skip to main content

char_width

Function char_width 

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

Calculate the display width of a single character.

Returns 0 for control characters and zero-width characters, 2 for CJK/fullwidth characters and emoji, 1 for most other characters.