Words Count

Build Status

Count the words and characters, with or without whitespaces.

Examples

```rust extern crate words_count;

use words_count::WordsCount;

asserteq!(WordsCount { words: 20, characters: 31, whitespaces: 2, cjk: 18, }, wordscount::count("Rust是由 Mozilla 主導開發的通用、編譯型程式語言。")); ```

```rust extern crate words_count;

let result = wordscount::countseparately("apple banana apple");

asserteq!(2, result.len()); asserteq!(Some(&2), result.get("apple")); ```

Crates.io

https://crates.io/crates/words-count

Documentation

https://docs.rs/words-count

License

MIT