Skip to content
paranoid text spacing
Rust
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches
src
tests
.editorconfig
.gitignore
.travis.yml
Cargo.toml
license-apache
license-mit
readme.md

readme.md

pangu

Build Status Crates Version Rust Docs

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).

Usage

Add to Cargo.toml:

[dependencies]
pangu = "0.2"

Example:

extern crate pangu;

fn main() {
  assert_eq!(
    pangu::spacing("新八的構造成分有95%是眼鏡、3%是水、2%是垃圾"),
    "新八的構造成分有 95% 是眼鏡、3% 是水、2% 是垃圾"
  );
}

License

Licensed under either of

at your option.

You can’t perform that action at this time.