aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2012-12-15 21:44:41 +0800
committerChong Yidong2012-12-15 21:44:41 +0800
commit5bec25eb1e1c91a2fe0aee9c332ff1506b021aa9 (patch)
tree245a212c400b5c0d37448f462f09eed8980471b4 /src
parent68abf86780a1b263640e287754dc43526d276aa3 (diff)
downloademacs-5bec25eb1e1c91a2fe0aee9c332ff1506b021aa9.tar.gz
emacs-5bec25eb1e1c91a2fe0aee9c332ff1506b021aa9.zip
* fns.c (Fcompare_strings): Doc fix.
* strings.texi (Text Comparison): Doc fix for compare-strings. Fixes: debbugs:13081
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fns.c18
2 files changed, 16 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fe30528da91..c123606efda 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-12-15 Chong Yidong <cyd@gnu.org>
2
3 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
4
12012-12-14 Eli Zaretskii <eliz@gnu.org> 52012-12-14 Eli Zaretskii <eliz@gnu.org>
2 6
3 * w32.c (get_name_and_id): Always pass NULL as the first argument 7 * w32.c (get_name_and_id): Always pass NULL as the first argument
diff --git a/src/fns.c b/src/fns.c
index b1ba5ce9509..539e8888dbc 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -211,12 +211,18 @@ Symbols are also allowed; their print names are used instead. */)
211 211
212DEFUN ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, 212DEFUN ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0,
213 doc: /* Compare the contents of two strings, converting to multibyte if needed. 213 doc: /* Compare the contents of two strings, converting to multibyte if needed.
214In string STR1, skip the first START1 characters and stop at END1. 214The arguments START1, END1, START2, and END2, if non-nil, are
215In string STR2, skip the first START2 characters and stop at END2. 215positions specifying which parts of STR1 or STR2 to compare. In
216END1 and END2 default to the full lengths of the respective strings. 216string STR1, compare the part between START1 (inclusive) and END1
217 217\(exclusive). If START1 is nil, it defaults to 0, the beginning of
218Case is significant in this comparison if IGNORE-CASE is nil. 218the string; if END1 is nil, it defaults to the length of the string.
219Unibyte strings are converted to multibyte for comparison. 219Likewise, in string STR2, compare the part between START2 and END2.
220
221The strings are compared by the numeric values of their characters.
222For instance, STR1 is "less than" STR2 if its first differing
223character has a smaller numeric value. If IGNORE-CASE is non-nil,
224characters are converted to lower-case before comparing them. Unibyte
225strings are converted to multibyte for comparison.
220 226
221The value is t if the strings (or specified portions) match. 227The value is t if the strings (or specified portions) match.
222If string STR1 is less, the value is a negative number N; 228If string STR1 is less, the value is a negative number N;