Function utf8_width::get_width
source · pub fn get_width(byte: u8) -> usizeExpand description
Given a first byte, determines how many bytes are in this UTF-8 character. If the UTF-8 character is invalid, returns 0, otherwise returns 1 ~ 4,