]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/helpers.el (string-reverse): New function.
authorBozhidar Batsov <bozhidar@batsov.com>
Tue, 26 Nov 2013 15:24:10 +0000 (17:24 +0200)
committerBozhidar Batsov <bozhidar@batsov.com>
Tue, 26 Nov 2013 15:24:10 +0000 (17:24 +0200)
etc/NEWS
lisp/ChangeLog
lisp/emacs-lisp/helpers.el

index 75cb7f6a2359ebf6dd03511500ee8511aec444c7..6b0d18459b1086ec888f286b6f91b0e4a6ea4737 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -788,6 +788,7 @@ frame.
 *** `hash-table-keys'
 *** `hash-table-values'
 *** `string-join`
+*** `string-reverse`
 *** `string-trim-left'
 *** `string-trim-right'
 *** `string-trim'
index c8a341483bc4f88b67f24e184d25d99b5e49f206..9554f8f45bb82e0411f915bfc161ccded3318af5 100644 (file)
@@ -1,3 +1,7 @@
+2013-11-26  Bozhidar Batsov  <bozhidar@batsov.com>
+
+       * emacs-lisp/helpers.el (string-reverse): New function.
+
 2013-11-26  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-file-name-regexp-unified): Support IPv6 host
index a8e6c494c4d9d2f9bb457b6f087a2234fd6bad70..8be0c6284866ab7b24611ede109430c5d50138d0 100644 (file)
   "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)