#cjk #white-space #spacing #readability #korean #japanese #chinese

pangu

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)

3 releases (breaking)

Uses old Rust 2015

0.2.0 May 26, 2018
0.1.0 May 10, 2017
0.0.1 May 7, 2017

#11 in #cjk

41 downloads per month
Used in notedown_fmt

MIT/Apache

11KB
51 lines

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.

Dependencies

~2.1–3MB
~53K SLoC