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:4195 top

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

Comments top

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