Skip to content

Commit

Permalink
Add comment in README linking to UAX unicode-rs#11 for further details.
Browse files Browse the repository at this point in the history
  • Loading branch information
theindigamer committed Oct 11, 2018
1 parent 6602390 commit 88bc3ea
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# unicode-width

Determine displayed width of `char` and `str` types according to
[Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/)
rules.
[Unicode Standard Annex #11][UAX11] rules.

[UAX11]: (http://www.unicode.org/reports/tr11/)

[![Build Status](https://travis-ci.org/unicode-rs/unicode-width.svg)](https://travis-ci.org/unicode-rs/unicode-width)

Expand All @@ -28,11 +29,19 @@ width. For example, the woman scientist emoji comprises of a woman emoji, a
zero-width joiner and a microscope emoji.

```rust
extern crate unicode_width;
use unicode_width::UnicodeWidthStr;

fn main() {
assert_eq!(UnicodeWidthStr::width("👩"), 2); // Woman
assert_eq!(UnicodeWidthStr::width("🔬"), 2); // Microscope
assert_eq!(UnicodeWidthStr::width("👩‍🔬"), 4); // Woman scientist
}
```

See [Unicode Standard Annex #11](UAX11) for precise details on what is and isn't
covered by this crate.

## features

unicode-width does not depend on libstd, so it can be used in crates
Expand Down

0 comments on commit 88bc3ea

Please sign in to comment.