coldnew / pangu.clj

Paranoid text spacing in Clojure/ClojureScript.

Home Page:https://coldnew.github.io/pangu.clj/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Paranoid text spacing in Clojure/ClojureScript.

https://coldnew.github.io/pangu.clj/

License:MIT License


Languages

Language:Clojure 91.2%Language:Shell 6.6%Language:JavaScript 2.2%