Skip to main content

char_width

Function char_width 

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

Display width of a single character, in terminal columns.

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