== name == CL-INTERPOL == category == Text processing == author == Dr. Edmund Weitz (mailto(edi@agharta.de), mailto(edi@weitz.de)) == author-image == == short-description == CL-INTERPOL provides string interpolation like in Unix shell scripts. == long-description == CL-INTERPOL is a library for Common Lisp which modifies the reader so that you can have interpolation within strings similar to Perl or Unix Shell scripts. It also provides various ways to insert arbitrary characters into literal strings even if your editor/IDE doesn't support them. CL-INTERPOL is also useful syntactical sugar for href(CL-PPCRE,http://weitz.de/cl-ppcre/). == examples == CL-USER(5): (enable-interpol-syntax) CL-USER(6): (let ((a 42)) #?"foo: \xC4\N{U with diaeresis}\nbar: ${a}") "foo: Δά bar: 42" CL-USER(7): (char-name (char #?"\x{2323}" 0)) "smile" CL-USER(8): (char-name (char #?"\N{Greek capital letter Sigma}" 0)) "greek_capital_letter_sigma" CL-USER(9): (setq cl-interpol:*short-unicode-names-p* t) T CL-USER(10): (char-name (char #?"\N{Greek:Sigma}" 0)) "greek_capital_letter_sigma" CL-USER(11): (push "Greek" cl-interpol:*unicode-scripts*) ("Greek" "latin") CL-USER(12): (char-name (char #?"\N{Sigma}" 0)) "greek_capital_letter_sigma" CL-USER(13): (char-name (char #?"\N{sigma}" 0)) "greek_small_letter_sigma" CL-USER(14): (let* ((a "foo") (b #\Space) (c "bar") (d (list a b c)) (x 40)) (values #?"$ @" #?"$(a)" (let ((cl-interpol:*list-delimiter* "")) #?"$$[b]" #?"\U${a}\E \u${a}" #?"@{d}") #?"The result is ${(let ((y 2)) (+ x y))}" (let ((cl-interpol:*list-delimiter* #\*)) #?"@{d}") (let ((cl-interpol:*list-delimiter* "")) #?"@{d}") #?"The result is ${(let ((y 2)) (+ x y))}" #?"${#?'${a} ${c}'} ${x}")) ;; note the embedded CL-INTERPOL string "$ @" "foo" "foo " "FOO Foo" "foo* *bar" "foo bar" "The result is 42" "foo bar 40" == instructions == Either load the file "load.lisp" or use ASDF: (asdf:oos 'asdf:load-op :cl-interpol) == tutorial == Lots of examples can be found in the documentation. == home-url == http://weitz.de/cl-interpol/ == doc-url == http://weitz.de/cl-interpol/ == license == CL-INTERPOL comes with a href(BSD license,http://www.opensource.org/licenses/bsd-license.php). == book == == references == == source-fooball == Download the source code from href(http://weitz.de/files/cl-interpol.tar.gz,http://weitz.de/files/cl-interpol.tar.gz). or href(ftp://ftp.franz.com/pub/lispwire/edi/cl-interpol-0.1.2.tar.gz,ftp://ftp.franz.com/pub/lispwire/edi/cl-interpol-0.1.2.tar.gz). bold(NOTE: Edi's site might have a newer version.) == release-date == 2004-12-16 == release-version == 0.1.2 == status == stable == history == == acl-dependencies == == other-dependencies == == platform == == ad ==