summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
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 a8e6c494c4d..8be0c628486 100644
--- a/lisp/emacs-lisp/helpers.el
+++ b/lisp/emacs-lisp/helpers.el
@@ -41,6 +41,10 @@
"Join all STRINGS using SEPARATOR."
(mapconcat 'identity strings separator))
+(defsubst string-reverse (str)
+ "Reverse the string STR."
+ (apply 'string (nreverse (string-to-list str))))
+
(defsubst string-trim-left (string)
"Remove leading whitespace from STRING."
(if (string-match "\\`[ \t\n\r]+" string)