Skip to content
Paranoid text spacing in Clojure/ClojureScript.
Clojure Shell JavaScript
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.
bin
doc
examples/pangu-test
spec/coldnew
src/coldnew
.gitignore
CHANGELOG.md
LICENSE
README.md
circle.yml
deploy.sh
project.clj

README.md

Pangu.clj

Circle CI GitHub license

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

Clojars Project

Latest codox API docs.

Dependencies

This library is designed for both Clojure/ClojureSript, you need following minimal version:

  • Clojure 1.7.0 ↑
  • ClojureScript 1.7.0 ↑

Usage

(ns pangu-test.core
  (:require [coldnew.pangu :as pangu]))

(defn -main []
  (println (pangu/spacing "請問Jackie的鼻子有幾個?123個!"))) ; => "請問 Jackie 的鼻子有幾個?123 個!"

Testing

This library test with speclj, to test with Clojure, use following command:

$ lein spec

If you want to test in ClojureScript, use below

$ lein cljsbuild test

Related Projects

License

Copyright © 2016 Yen-Chin, Lee <coldnew.tw@gmail.com>

Distributed under the MIT License.

You can’t perform that action at this time.