https://github.com/vinta/pangu.java
Paranoid text spacing in Java
https://github.com/vinta/pangu.java
Last synced: 6 months ago
JSON representation
Paranoid text spacing in Java
- Host: GitHub
- URL: https://github.com/vinta/pangu.java
- Owner: vinta
- License: mit
- Created: 2014-11-18T18:25:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-03-30T17:57:54.000Z (over 2 years ago)
- Last Synced: 2025-03-28T12:21:13.036Z (7 months ago)
- Language: Java
- Size: 22.5 KB
- Stars: 63
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Pangu.java
==========[](https://vinta.ws/code/)
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit and symbol characters.
- [pangu.go](https://github.com/vinta/pangu) (Go)
- [pangu.java](https://github.com/vinta/pangu.java) (Java)
- [pangu.js](https://github.com/vinta/pangu.js) (JavaScript)
- [pangu.py](https://github.com/vinta/pangu.py) (Python)
- [pangu.space](https://github.com/vinta/pangu.space) (Web API)## Download
Download [the latest JAR](https://search.maven.org/remote_content?g=ws.vinta&a=pangu&v=LATEST) or grab via [Maven](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22ws.vinta%22%20AND%20a%3A%22pangu%22):
```xml
ws.vinta
pangu
1.1.0```
or Gradle:
```groovy
compile 'ws.vinta:pangu:1.1.0'
```## Usage
```java
import ws.vinta.pangu.Pangu;public class Main {
public static void main(String[] args) {
Pangu pangu = new Pangu();
String newText = pangu.spacingText("請問Jackie的鼻子有幾個?123個!");
System.out.println(newText); // will be "請問 Jackie 的鼻子有幾個?123 個!"
}
}
```## Run Tests
```console
$ mvn test
```