Skip to content

Commit 3df193d

Browse files
committed
add travis, README, update Cargo.toml
1 parent 85050d8 commit 3df193d

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
language: rust

Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[package]
2+
23
name = "unicode_width"
34
version = "0.0.1"
45
authors = ["kwantam <kwantam@gmail.com>"]
6+
7+
homepage = "https://github.com/unicode-rs/unicode_width"
8+
repository = "https://github.com/unicode-rs/unicode_width"
9+
documentation = "https://unicode-rs.github.io/unicode_width/unicode_width"
10+
license = "MIT/Apache-2.0"
11+
keywords = ["text", "width", "unicode"]
12+
readme = "README.md"
13+
description = """
14+
Determine displayed width of `char` and `str` types
15+
according to Unicode Standard Annex #11 rules.
16+
"""
17+
18+
exclude = [ "target/*", "Cargo.lock" ]

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# unicode_width
2+
3+
Determine displayed width of `char` and `str` types according to
4+
[Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/)
5+
rules.
6+
7+
[![Build Status](https://travis-ci.org/unicode-rs/unicode_width.svg?branch=master)](https://travis-ci.org/unicode-rs/unicode_width)
8+
9+
```rust
10+
extern crate unicode_width;
11+
12+
use unicode_width::UnicodeWidthStr;
13+
14+
fn main() {
15+
let teststr = "Hello, world!";
16+
let width = UnicodeWidthStr::width(teststr);
17+
println!("{}", teststr);
18+
println!("The above string is {} columns wide.", width);
19+
let width = teststr.width_cjk();
20+
println!("The above string is {} columns wide (CJK).", width);
21+
}
22+
```
23+
24+
[Documentation](http://unicode-rs.github.io/unicode_width/unicode_width/)

0 commit comments

Comments
 (0)