unicode-width 0.0.1

Determine displayed width of `char` and `str` types according to Unicode Standard Annex #11 rules.
docs.rs failed to build unicode-width-0.0.1
Please check the build logs and, if you believe this is docs.rs' fault, open an issue.

unicode-width

Determine displayed width of char and str types according to Unicode Standard Annex #11 rules.

Build Status

extern crate unicode_width;

use unicode_width::UnicodeWidthStr;

fn main() {
    let teststr = "Hello, world!";
    let width = UnicodeWidthStr::width(teststr);
    println!("{}", teststr);
    println!("The above string is {} columns wide.", width);
    let width = teststr.width_cjk();
    println!("The above string is {} columns wide (CJK).", width);
}

Documentation