opencc

Crates.ioopencc
lib.rsopencc
version0.3.0
sourcesrc
created_at2015-05-26 16:48:01.96852
updated_at2018-01-31 01:56:42.225113
descriptionOpenCC binding for Rust
homepage
repositoryhttps://github.com/messense/opencc-rs
max_upload_size
id2223
size9,041
messense (messense)

documentation

https://messense.github.io/opencc-rs

README

opencc-rs

Build Status Coverage Status Crates.io

OpenCC binding for Rust.

Read the documentation.

Installation

You should install OpenCC 1.0.x library first.

Add it to your Cargo.toml:

[dependencies]
opencc = "*"

Add extern crate opencc to your crate root and your're good to go! For example:

extern crate opencc;

use opencc::OpenCC;

fn main() {
    let cc = OpenCC::new("t2s.json");
    println!("{}", cc.convert("乾坤一擲"));
    println!("{}", cc.convert("開放中文轉換"));
}

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

Commit count: 35

cargo fmt