[−][src]Function autocorrect::format
pub fn format(text: &str) -> String
Automatically add spaces between Chinese and English words.
This method only work for plain text.
Example
extern crate autocorrect; println!("{}", autocorrect::format("学习如何用Rust构建Application")); // => "学习如何用 Rust 构建 Application" println!("{}", autocorrect::format("于3月10日开始")); // => "于 3 月 10 日开始" println!("{}", autocorrect::format("既に、世界中の数百という企業がRustを採用し、高速で低リソースのクロスプラットフォームソリューションを実現しています。")); // => "既に、世界中の数百という企業が Rust を採用し、高速で低リソースのクロスプラットフォームソリューションを実現しています。"