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 for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: unicode-width-0.1.11

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