Commit 4301875e authored by Bozhidar Batsov's avatar Bozhidar Batsov
Browse files

* lisp/emacs-lisp/helpers.el (string-join): New function.

parent e4091d85
...@@ -775,6 +775,7 @@ frame. ...@@ -775,6 +775,7 @@ frame.
** New library helpers.el for misc helper functions ** New library helpers.el for misc helper functions
*** `hash-table-keys' *** `hash-table-keys'
*** `hash-table-values' *** `hash-table-values'
*** `string-join`
*** `string-trim-left' *** `string-trim-left'
*** `string-trim-right' *** `string-trim-right'
*** `string-trim' *** `string-trim'
......
2013-11-25 Bozhidar Batsov <bozhidar@bozhidar.com> 2013-11-25 Bozhidar Batsov <bozhidar@batsov.com>
* emacs-lisp/bytecomp.el (byte-compile-form): Fix a typo. * emacs-lisp/bytecomp.el (byte-compile-form): Fix a typo.
* emacs-lisp/helpers.el (string-join): New function.
2013-11-25 Sebastian Wiesner <lunaryorn@gmail.com> 2013-11-25 Sebastian Wiesner <lunaryorn@gmail.com>
* emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
(maphash (lambda (_k v) (push v values)) hash-table) (maphash (lambda (_k v) (push v values)) hash-table)
values)) values))
(defsubst string-join (strings &optional separator)
"Join all STRINGS using SEPARATOR."
(mapconcat 'identity strings separator))
(defsubst string-trim-left (string) (defsubst string-trim-left (string)
"Remove leading whitespace from STRING." "Remove leading whitespace from STRING."
(if (string-match "\\`[ \t\n\r]+" string) (if (string-match "\\`[ \t\n\r]+" string)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment