aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/strings.texi20
1 files changed, 6 insertions, 14 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 19301de06fa..ce629aa8259 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -633,20 +633,12 @@ If your system does not support a locale environment, this function
633behaves like @code{string-lessp}. 633behaves like @code{string-lessp}.
634@end defun 634@end defun
635 635
636@defun string-numerical-lessp strin1 string2 636@defun string-version-lessp string1 string2
637This function behaves like @code{string-lessp} for stretches of 637This function compares strings lexicographically, except it treats
638consecutive non-numerical characters, but compares sequences of 638sequences of numerical characters as if they comprised a base-ten
639numerical characters as if they comprised a base-ten number, and then 639number, and then compares the numbers. So @samp{foo2.png} is
640compares the numbers. So @samp{foo2.png} is ``smaller'' than 640``smaller'' than @samp{foo12.png} according to this predicate, even if
641@samp{foo12.png} according to this predicate, even if @samp{12} is 641@samp{12} is lexicographically ``smaller'' than @samp{2}.
642lexicographically ``smaller'' than @samp{2}.
643
644If one string has a number in a position in the string, and the other
645doesn't, then lexicograpic comparison is done at that point, so
646@samp{foo.png} is ``smaller'' than @samp{foo2.png}. If any of the
647numbers in the strings are larger than can be represented as an
648integer number, the entire string is compared using
649@code{string-less}.
650@end defun 642@end defun
651 643
652@defun string-prefix-p string1 string2 &optional ignore-case 644@defun string-prefix-p string1 string2 &optional ignore-case