aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorBozhidar Batsov2013-11-26 17:24:10 +0200
committerBozhidar Batsov2013-11-26 17:24:10 +0200
commit447bdcb8d26da5664ff2b127489f9b2209de227e (patch)
treed55cf85bd4af669d4dc71bf5c320667da5427d18 /lisp
parent5fbf6856db55049a694585a5dc76d96ba09158b3 (diff)
downloademacs-447bdcb8d26da5664ff2b127489f9b2209de227e.tar.gz
emacs-447bdcb8d26da5664ff2b127489f9b2209de227e.zip
* lisp/emacs-lisp/helpers.el (string-reverse): New function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/helpers.el4
2 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c8a341483bc..9554f8f45bb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-11-26 Bozhidar Batsov <bozhidar@batsov.com>
2
3 * emacs-lisp/helpers.el (string-reverse): New function.
4
12013-11-26 Michael Albinus <michael.albinus@gmx.de> 52013-11-26 Michael Albinus <michael.albinus@gmx.de>
2 6
3 * net/tramp.el (tramp-file-name-regexp-unified): Support IPv6 host 7 * 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 a8e6c494c4d..8be0c628486 100644
--- a/lisp/emacs-lisp/helpers.el
+++ b/lisp/emacs-lisp/helpers.el
@@ -41,6 +41,10 @@
41 "Join all STRINGS using SEPARATOR." 41 "Join all STRINGS using SEPARATOR."
42 (mapconcat 'identity strings separator)) 42 (mapconcat 'identity strings separator))
43 43
44(defsubst string-reverse (str)
45 "Reverse the string STR."
46 (apply 'string (nreverse (string-to-list str))))
47
44(defsubst string-trim-left (string) 48(defsubst string-trim-left (string)
45 "Remove leading whitespace from STRING." 49 "Remove leading whitespace from STRING."
46 (if (string-match "\\`[ \t\n\r]+" string) 50 (if (string-match "\\`[ \t\n\r]+" string)