add documentation to utf8_char_width

This commit is contained in:
Ty Overby 2017-10-13 17:58:53 -07:00
parent 1cf9a0eb56
commit 1cc66df1d5
1 changed files with 1 additions and 0 deletions

View File

@ -458,6 +458,7 @@ static UTF8_CHAR_WIDTH: [u8; 256] = [
4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, // 0xFF 4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, // 0xFF
]; ];
// This function is a copy of core::str::utf8_char_width
fn utf8_char_width(b: u8) -> usize { fn utf8_char_width(b: u8) -> usize {
UTF8_CHAR_WIDTH[b as usize] as usize UTF8_CHAR_WIDTH[b as usize] as usize
} }