Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Embedding Clojure expression into a string
Clojure
Tree: 95fbeb10f0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/hozumi
test/hozumi
.gitignore
README.md
epl-v10.html
project.clj

README.md

clj-embed-s

clj-embed-s enables you to embed Clojure expression into a string like Ruby. The trick is that when the macro is expanded, it divides a string into parts, which given to str function.

Usage

(use 'hozumi.embed)

(embed "abc#{(+ 1 2)}def")
=> "abc3def"

(let [gree "Hello"]
  (embed "#{gree} world!"))
=> "Hello world!"

Installation

Leiningen [hozumi/clj-embed-s "1.0.0-SNAPSHOT"]

Something went wrong with that request. Please try again.