diff options
| -rw-r--r-- | etc/NEWS | 1 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/helpers.el | 4 |
3 files changed, 9 insertions, 0 deletions
| @@ -788,6 +788,7 @@ frame. | |||
| 788 | *** `hash-table-keys' | 788 | *** `hash-table-keys' |
| 789 | *** `hash-table-values' | 789 | *** `hash-table-values' |
| 790 | *** `string-join` | 790 | *** `string-join` |
| 791 | *** `string-reverse` | ||
| 791 | *** `string-trim-left' | 792 | *** `string-trim-left' |
| 792 | *** `string-trim-right' | 793 | *** `string-trim-right' |
| 793 | *** `string-trim' | 794 | *** `string-trim' |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c8a341483bc..9554f8f45bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-11-26 Bozhidar Batsov <bozhidar@batsov.com> | ||
| 2 | |||
| 3 | * emacs-lisp/helpers.el (string-reverse): New function. | ||
| 4 | |||
| 1 | 2013-11-26 Michael Albinus <michael.albinus@gmx.de> | 5 | 2013-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) |