项目作者: coldnew

项目描述 :
clojure/clojurescript port of left-pad: https://github.com/azer/left-pad
高级语言: Clojure
项目地址: git://github.com/coldnew/left-pad.clj.git
创建时间: 2016-03-26T15:22:46Z
项目社区:https://github.com/coldnew/left-pad.clj

开源协议:MIT License

下载


left-pad.clj

Circle CI
GitHub license

String left pad.

This library is clojure/clojurescript port of left-pad, it’s NOT recommand to use this library actually :).

Clojars Project

Latest codox API docs.

Dependencies

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

  • Clojure 1.8.0 ↑
  • ClojureScript 1.8.34 ↑

Usage

  1. (ns left-pad-test.core
  2. (:require [coldnew.left-pad :refer [leftpad]))
  3. (leftpad "foo" 5)
  4. ;; => " foo"
  5. (leftpad "foobar" 6)
  6. ;; => "foobar"
  7. (leftpad 1 2 0)
  8. ;; => "01"

Testing

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

  1. $ lein spec

If you want to test in ClojureScript, use below

  1. $ lein cljsbuild test

License

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

Distributed under the MIT License.