Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit and symbol characters.
- Go version: pangu.go
- Java version: pangu.java
- JavaScript version: pangu.js
- Node.js version: pangu.node
- Python version: pangu.py
- Ruby version: pangu.rb
Installation
The simplest option is to use pod "Pangu"
.
You can also add the two files NSString+Pangu.h/m
to your project. There are no further requirements.
Usage
#import "NSString+Pangu.h"
[NSString spacing:@"請問Jackie的鼻子有幾個?123個!"];
// 請問 Jackie 的鼻子有幾個?123 個!
License
Released under the MIT License.