Skip to content
Paranoid text spacing in PHP
PHP
Branch: master
Clone or download
Latest commit 954453d Aug 20, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes 🎪 Added .gitattributes Jul 29, 2015
.travis.yml Fix travis settings Aug 8, 2018
LICENSE Init Jul 29, 2015
README.md Update README.md Jun 27, 2017
composer.json Fix travis settings Aug 8, 2018
pangu-cli.php Add pangu-cli.php Jul 29, 2015
pangu-test.php Change some settings of travis Aug 8, 2018
pangu.php Fix bug Aug 20, 2018
phpunit.xml Add PHP Unit Test Cases #1 Jul 30, 2015

README.md

pangu.php

TravisCI

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

Installation

Using composer

composer require kunr/pangu.php

Or manually

git clone https://github.com/Kunr/pangu.php.git

Usage

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 個!

License

Released under the MIT License.

You can’t perform that action at this time.