The fork of pangu-rs.
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
Add to Cargo.toml
:
toml
[dependencies]
pangu2 = "0.1"
Example:
rust
fn main() {
assert_eq!(
pangu2::spacing("新八的構造成分有95%是眼鏡、3%是水、2%是垃圾"),
"新八的構造成分有 95% 是眼鏡、3% 是水、2% 是垃圾"
);
}
Licensed under either of
at your option.