summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2013-11-26 17:24:10 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2013-11-26 17:24:10 +0200
commit447bdcb8d26da5664ff2b127489f9b2209de227e (patch)
treed55cf85bd4af669d4dc71bf5c320667da5427d18 /lisp/emacs-lisp
parent5fbf6856db55049a694585a5dc76d96ba09158b3 (diff)
downloademacs-447bdcb8d26da5664ff2b127489f9b2209de227e.tar.gz
emacs-447bdcb8d26da5664ff2b127489f9b2209de227e.tar.bz2
emacs-447bdcb8d26da5664ff2b127489f9b2209de227e.zip
* lisp/emacs-lisp/helpers.el (string-reverse): 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 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)