diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/strings.texi | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 9d6613c522c..a3efbf2f223 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -633,6 +633,19 @@ If your system does not support a locale environment, this function | |||
| 633 | behaves like @code{string-lessp}. | 633 | behaves like @code{string-lessp}. |
| 634 | @end defun | 634 | @end defun |
| 635 | 635 | ||
| 636 | @defun string-numerical-lessp strin1 string2 | ||
| 637 | This function behaves like @code{string-lessp} for stretches of | ||
| 638 | consecutive non-numerical characters, but compares sequences of | ||
| 639 | numerical characters as if they comprised a base-ten number, and then | ||
| 640 | compares the numbers. So @samp{foo2.png} is ``smaller'' than | ||
| 641 | @samp{foo12.png} according to this predicate, even if @samp{12} is | ||
| 642 | lexicographically ``smaller'' than @samp{2}. | ||
| 643 | |||
| 644 | If one string has a number in a position in the string, and the other | ||
| 645 | doesn't, then lexicograpic comparison is done at that point, so | ||
| 646 | @samp{foo.png} is ``smaller'' than @samp{foo2.png}. | ||
| 647 | @end defun | ||
| 648 | |||
| 636 | @defun string-prefix-p string1 string2 &optional ignore-case | 649 | @defun string-prefix-p string1 string2 &optional ignore-case |
| 637 | This function returns non-@code{nil} if @var{string1} is a prefix of | 650 | This function returns non-@code{nil} if @var{string1} is a prefix of |
| 638 | @var{string2}; i.e., if @var{string2} starts with @var{string1}. If | 651 | @var{string2}; i.e., if @var{string2} starts with @var{string1}. If |