bbbates/stint


Simple string interpolation for clojure

License: EPL-1.0

Language: Clojure


stint

Simple perl/ruby/groovy-style string interpolation for clojure

Install

Leiningen

[stint "0.1.0"]

Usage

(use 'stint.core)

(let [foo "return"
      bar "should"
      gah "identity"]
  (str-intern "${bar} ${foo} ${gah}"))

;; => "should return identity"

;; OR use one of the tagged reader synonyms:
(let [foo "return"
      bar "should"
      gah "identity"]
  [#st/int "${bar} ${foo} ${gah}"
   #s/<- "${bar} ${foo} ${gah}"
   #str/<- "${bar} ${foo} ${gah}"])

;; => ["should return identity" "should return identity" "should return identity"]

Stint can only interpolate bound symbols or vars at the moment (clojure expressions are coming.)

TODO

  • Clojurescript support.

License

Copyright © 2015 ICM Consulting Pty Ltd.

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Project Statistics

Sourcerank 2
Repository Size 117 KB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 2
Contributors 1
Tags 1
Created
Last updated
Last pushed

Top Contributors See all

Brendan

Packages Referencing this Repo

stint
String interning for clojure
Latest release 0.1.1 - Updated

Recent Tags See all

0.1.0 March 26, 2015

Something wrong with this page? Make a suggestion

Last synced: 2018-01-16 17:53:26 UTC

Login to resync this repository