From: Bozhidar Batsov Date: Tue, 26 Nov 2013 15:24:10 +0000 (+0200) Subject: * lisp/emacs-lisp/helpers.el (string-reverse): New function. X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/447bdcb8d26da5664ff2b127489f9b2209de227e * lisp/emacs-lisp/helpers.el (string-reverse): New function. --- diff --git a/etc/NEWS b/etc/NEWS index 75cb7f6a23..6b0d18459b 100644 --- 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' diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c8a341483b..9554f8f45b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-11-26 Bozhidar Batsov + + * emacs-lisp/helpers.el (string-reverse): New function. + 2013-11-26 Michael Albinus * net/tramp.el (tramp-file-name-regexp-unified): Support IPv6 host diff --git a/lisp/emacs-lisp/helpers.el b/lisp/emacs-lisp/helpers.el index a8e6c494c4..8be0c62848 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)