Skip to content

Commit 88bc3ea

Browse files
author
theindigamer
committed
Add comment in README linking to UAX #11 for further details.
1 parent 6602390 commit 88bc3ea

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# unicode-width
22

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

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

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

3031
```rust
32+
extern crate unicode_width;
33+
use unicode_width::UnicodeWidthStr;
34+
35+
fn main() {
3136
assert_eq!(UnicodeWidthStr::width("👩"), 2); // Woman
3237
assert_eq!(UnicodeWidthStr::width("🔬"), 2); // Microscope
3338
assert_eq!(UnicodeWidthStr::width("👩‍🔬"), 4); // Woman scientist
39+
}
3440
```
3541

42+
See [Unicode Standard Annex #11](UAX11) for precise details on what is and isn't
43+
covered by this crate.
44+
3645
## features
3746

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

0 commit comments

Comments
 (0)