str

function/macrosince v0.0-927 clojure.core/strEdit
(str)
(str x)
(str x & ys)

Details:

(str) and (str nil) return the empty string.

(str x) returns x.toString().

With more than one argument, returns the concatenation of the str values of the arguments.


Source docstring:
With no args, returns the empty string. With one arg x, returns
x.toString().  (str nil) returns the empty string. With more than
one arg, returns the concatenation of the str values of the args.
Function code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn str
  ([] "")
  ([x] (if (nil? x)
         ""
         (.join #js [x] "")))
  ([x & ys]
    (loop [sb (StringBuffer. (str x)) more ys]
      (if more
        (recur (. sb  (append (str (first more)))) (next more))
        (.toString sb)))))

Macro code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro str
  ([] "")
  ([x]
   (if (typed-expr? &env x '#{string})
     x
     (string-expr (core/list 'js* "cljs.core.str.cljs$core$IFn$_invoke$arity$1(~{})" x))))
  ([x & ys]
   (core/let [interpolate (core/fn [x]
                            (if (typed-expr? &env x '#{string clj-nil})
                              "~{}"
                              "cljs.core.str.cljs$core$IFn$_invoke$arity$1(~{})"))
              strs        (core/->> (core/list* x ys)
                            (map interpolate)
                            (interpose ",")
                            (apply core/str))]
     (string-expr (list* 'js* (core/str "[" strs "].join('')") x ys)))))