Commit 41ce6f70 authored by Bozhidar Batsov's avatar Bozhidar Batsov
Browse files

* lisp/subr.el (string-suffix-p): New function.

parent 0b09f7c0
......@@ -790,6 +790,8 @@ The few hooks that used with-wrapper-hook are replaced as follows:
The value, if non-nil, is a regexp that specifies what to trim from
the start and end of each substring.
** New function `string-suffix-p'.
** `get-upcase-table' is obsoleted by the new `case-table-get-table'.
** Support for filesystem notifications.
......
2013-11-24 Bozhidar Batsov <bozhidar@batsov.com>
* subr.el (string-suffix-p): New function.
2013-11-23 Glenn Morris <rgm@gnu.org>
* progmodes/python.el (python-shell-send-file):
......
......@@ -3635,6 +3635,15 @@ to case differences."
(eq t (compare-strings str1 nil nil
str2 0 (length str1) ignore-case)))
(defun string-suffix-p (suffix string &optional ignore-case)
"Return non-nil if SUFFIX is a suffix of STRING.
If IGNORE-CASE is non-nil, the comparison is done without paying
attention to case differences."
(let ((start-pos (- (length string) (length suffix))))
(and (>= start-pos 0)
(eq t (compare-strings suffix nil nil
string start-pos nil ignore-case)))))
(defun bidi-string-mark-left-to-right (str)
"Return a string that can be safely inserted in left-to-right text.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment