Function utf8_width::get_width
source · pub const fn get_width(byte: u8) -> usize
Expand description
Given a first byte, determine how many bytes are in this UTF-8 character. If the UTF-8 character is invalid, return 0
; otherwise, return 1
to 4
.