summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2013-11-25 21:04:50 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2013-11-25 21:04:50 +0200
commit4301875e6e41926fe09c34cf18204ee47b37a742 (patch)
tree08d472631c9f795db4b5de0948bebf6706badd14 /lisp/emacs-lisp
parente4091d8586d9efb38c3b6967cf6ee740f894919a (diff)
downloademacs-4301875e6e41926fe09c34cf18204ee47b37a742.tar.gz
emacs-4301875e6e41926fe09c34cf18204ee47b37a742.tar.bz2
emacs-4301875e6e41926fe09c34cf18204ee47b37a742.zip
* lisp/emacs-lisp/helpers.el (string-join): New function.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/helpers.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/helpers.el b/lisp/emacs-lisp/helpers.el
index fd5985467b5..a8e6c494c4d 100644
--- a/lisp/emacs-lisp/helpers.el
+++ b/lisp/emacs-lisp/helpers.el
@@ -37,6 +37,10 @@
(maphash (lambda (_k v) (push v values)) hash-table)
values))
+(defsubst string-join (strings &optional separator)
+ "Join all STRINGS using SEPARATOR."
+ (mapconcat 'identity strings separator))
+
(defsubst string-trim-left (string)
"Remove leading whitespace from STRING."
(if (string-match "\\`[ \t\n\r]+" string)