Struct opencc::OpenCC
[−]
[src]
pub struct OpenCC { pub config: String, // some fields omitted }
Fields
config: String
Configuration file
Methods
impl OpenCC
[src]
fn new(config: &str) -> OpenCC
[src]
fn convert(&self, text: &str) -> String
[src]
Convert a text
Examples
let cc = opencc::OpenCC::new("t2s.json"); cc.convert("乾坤一擲"); cc.convert("開放中文轉換");
fn last_error(&mut self) -> Option<String>
[src]
Returns the last error message
Safety
Note that this function is the only one which is NOT thread-safe.