https://github.com/coldnew/pangu.clj
Paranoid text spacing in Clojure/ClojureScript.
https://github.com/coldnew/pangu.clj
clojure clojurescript pangu-spacing
Last synced: about 1 month ago
JSON representation
Paranoid text spacing in Clojure/ClojureScript.
- Host: GitHub
- URL: https://github.com/coldnew/pangu.clj
- Owner: coldnew
- License: mit
- Created: 2016-02-12T12:29:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-15T16:38:42.000Z (over 9 years ago)
- Last Synced: 2025-04-12T15:04:48.509Z (about 1 month ago)
- Topics: clojure, clojurescript, pangu-spacing
- Language: Clojure
- Homepage: https://coldnew.github.io/pangu.clj/
- Size: 102 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Pangu.clj
[](https://circleci.com/gh/coldnew/pangu.clj)
[](https://raw.githubusercontent.com/coldnew/pangu.clj/master/LICENSE)Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit and symbol characters.
[](http://clojars.org/coldnew/pangu)
[Latest codox API docs](https://coldnew.github.io/pangu.clj/).
## Dependencies
This library is designed for **both** Clojure/ClojureSript, you need following minimal version:
* Clojure 1.7.0 ↑
* ClojureScript 1.7.0 ↑## Usage
```clojure
(ns pangu-test.core
(:require [coldnew.pangu :as pangu]))(defn -main []
(println (pangu/spacing "請問Jackie的鼻子有幾個?123個!"))) ; => "請問 Jackie 的鼻子有幾個?123 個!"```
## Testing
This library test with [speclj](https://github.com/slagyr/speclj), to test with Clojure, use following command:
```
$ lein spec
```If you want to test in ClojureScript, use below
```
$ lein cljsbuild test
```## Related Projects
* [pangu.js](https://github.com/vinta/pangu.js) (JavaScript, both Node.js and Browser)
* [pangu.go](https://github.com/vinta/pangu) (Go)
* [pangu.java](https://github.com/vinta/pangu.java) (Java)
* [pangu.py](https://github.com/vinta/pangu.py) (Python)
* [pangu.rb](https://github.com/dlackty/pangu.rb) (Ruby)
* [pangu.objective-c](https://github.com/Cee/pangu.objective-c) (Objective-C)
* [pangu.php](https://github.com/Kunr/pangu.php) (PHP)
* [pangu.ex](https://github.com/cataska/pangu.ex) (Elixir)## License
Copyright © 2016 Yen-Chin, Lee <>
Distributed under the [MIT License](http://opensource.org/licenses/MIT).