diff options
Diffstat (limited to 'doc/lispref/strings.texi')
-rw-r--r-- | doc/lispref/strings.texi | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 7097de49064..7f640255a7a 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -43,7 +43,7 @@ integer is a character or not is determined only by how it is used. Emacs. A string is a fixed sequence of characters. It is a type of -sequence called a @dfn{array}, meaning that its length is fixed and +sequence called an @dfn{array}, meaning that its length is fixed and cannot be altered once it is created (@pxref{Sequences Arrays Vectors}). Unlike in C, Emacs Lisp strings are @emph{not} terminated by a distinguished character code. @@ -612,6 +612,7 @@ that collation implements. @end defun @cindex lexical comparison of strings +@anchor{definition of string<} @defun string< string1 string2 @c (findex string< causes problems for permuted index!!) This function compares two strings a character at a time. It @@ -691,7 +692,8 @@ for sorting (@pxref{Sequence Functions}): @example @group -(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp) +(sort '("11" "12" "1 1" "1 2" "1.1" "1.2") + :lessp #'string-collate-lessp) @result{} ("11" "1 1" "1.1" "12" "1 2" "1.2") @end group @end example @@ -708,8 +710,8 @@ systems. The @var{locale} value of @code{"POSIX"} or @code{"C"} lets @example @group -(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2") - (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX"))) +(sort '("11" "12" "1 1" "1 2" "1.1" "1.2") + :lessp (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX"))) @result{} ("1 1" "1 2" "1.1" "1.2" "11" "12") @end group @end example @@ -1369,7 +1371,7 @@ given width and precision, if specified. @item > This flag causes the substitution to be truncated on the right to the -given width, if specified. +given width and precision, if specified. @item ^ This flag converts the substituted text to upper case (@pxref{Case |