Function unicode_width::tables::charwidth::width
source · pub fn width(c: char, is_cjk: bool) -> Option<usize>
Expand description
Returns the UAX #11 based width of c
, or
None
if c
is a control character other than '\x00'
.
If is_cjk == true
, ambiguous width characters are treated as double width; otherwise,
they’re treated as single width.