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).
- Go version: pangu.go
- Java version: pangu.java
- JavaScript version: pangu.js
- Node.js version: pangu.node
- Object-C version pangu.objective-c
- Python version: pangu.py
- Ruby version: pangu.rb
Using composer
composer require kunr/pangu.php
Or manually
git clone https://github.com/Kunr/pangu.php.git
Require pangu.php
require 'pangu.php';
echo pangu('Jackie的鼻子有幾個?123個!'); // Jackie 的鼻子有幾個?123 個!
Or
Use pangu-cli.php
php pangu-cli.php "Jackie的鼻子有幾個?123個!" //// Jackie 的鼻子有幾個?123 個!
Released under the MIT License.