unicode_width::tables

Function lookup_width

source
fn lookup_width(c: char) -> (u8, WidthInfo)
Expand description

Returns the UAX #11 based width of c by consulting a multi-level lookup table.

ยงMaintenance

The tables themselves are autogenerated but this function is hardcoded. You should have nothing to worry about if you re-run unicode.py (for example, when updating Unicode.) However, if you change the actual structure of the lookup tables (perhaps by editing the make_tables function in unicode.py) you must ensure that this code reflects those changes.