Function: string-join

string-join is a byte-compiled function defined in subr-x.el.gz.

Signature

(string-join STRINGS &optional SEPARATOR)

Documentation

Join all STRINGS using SEPARATOR.

Other relevant functions are documented in the string group.

Probably introduced at or before Emacs version 24.4.

Shortdoc

;; string
(string-join '("foo" "bar" "zot") " ")
    => "foo bar zot"

Aliases

json-join (obsolete since 28.1)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/subr-x.el.gz
(defsubst string-join (strings &optional separator)
  "Join all STRINGS using SEPARATOR."
  (mapconcat #'identity strings separator))