Changes for clojure.core/print-str

matthewg on Tue, 06 Dec 2011
;; Create a string from the given items and store it in x.
user=> (def x (print-str 1 "foo" \b \a \r {:a 2}))
#'user/x

;; It's a string.
user=> (string? x)
true

;; Notice that each item is separated by a space.
user=> x
"1 foo b a r {:a 2}"

Miles on Fri, 22 Oct 2010
user=> (def x "Hello!\nMy name is George.\n")
#'user/x

user=> (print-str x)
"Hello!\nMy name is George.\n"
zkim on Sun, 26 Sep 2010
user=> (def x "Hello!\nMy name is Simon.\n")
#'user/x

user=> (print-str x)
"Hello!\nMy name is Simon.\n"
Miles on Sat, 11 Sep 2010
user=> (def x "Hello!\nMy name is Simon.\n")
#'user/x
user=> (print-str x)
"Hello!\nMy name is Simon.\n"
Miles on Sat, 11 Sep 2010
user=> (def x [1 2 3 4])
#'user/x
user=> x
[1 2 3 4]
user=> (print-str x)
"[1 2 3 4]"
Miles on Sat, 11 Sep 2010
user=> (def x [1 2 3 4])
#'user/x
user=> x
[1 2 3 4]
user==> (print-str x)
"[1 2 3 4]"
Miles on Sat, 11 Sep 2010
user=> (def x [1 2 3 4])
#'user/x
user> x
[1 2 3 4]
user=> (print-str x)
"[1 2 3 4]"
Miles on Sat, 11 Sep 2010
user=> (def x [1 2 3 4])
#'user/x
user> x
[1 2 3 4]

;; turn the data into a string...
user=> (print-str x)
"[1 2 3 4]"

;; ...and turn that string back into data!
user=> (eval (read-string (print-str x)))
[1 2 3 4]