Merge remote-tracking branch 'huonw/inline-helpers'

This commit is contained in:
Brian Anderson
2014-02-23 15:44:20 -08:00
2 changed files with 2 additions and 0 deletions

View File

@@ -1061,6 +1061,7 @@ static UTF8_CHAR_WIDTH: [u8, ..256] = [
];
/// Given a first byte, determine how many bytes are in this UTF-8 character
#[inline]
pub fn utf8_char_width(b: u8) -> uint {
return UTF8_CHAR_WIDTH[b] as uint;
}