All Projects → vinta → pangu.java

vinta / pangu.java

Licence: MIT License
Paranoid text spacing in Java

Programming Languages

java
68154 projects - #9 most used programming language

Pangu.java

Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit and symbol characters.

Download

Download the latest JAR or grab via Maven:

<dependency>
  <groupId>ws.vinta</groupId>
  <artifactId>pangu</artifactId>
  <version>1.1.0</version>
</dependency>

or Gradle:

compile 'ws.vinta:pangu:1.1.0'

Usage

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

$ mvn test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].