You're viewing version 1.2.0 of prn-str. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

prn-str

clojure.core

  • (prn-str & xs)
prn to a string, returning it

1 Example top

  • user=> (def x "Hello!\nMy name is George.\n")
    #'user/x
    
    user=> (prn-str x)
    "Hello!\nMy name is George.\n\n"
    nil
    
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/prn

    Same as pr followed by (newline). Observes *flush-on-newline*

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3702 top

(defn prn-str
  "prn to a string, returning it"
  {:tag String
   :added "1.0"}
  [& xs]
  (with-out-str
   (apply prn xs)))
Vars in clojure.core/prn-str: apply defn prn with-out-str
Used in 1 other vars eval-in-project

Comments top

No comments for prn-str. Log in to add a comment.