Skip to content
Paranoid text spacing in PHP
Branch: master
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.
.gitattributes
.travis.yml
LICENSE
README.md
composer.json
pangu-cli.php
pangu-test.php
pangu.php
phpunit.xml

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.