GNU Emacs Lisp Reference Manual
t if the arguments represent the same character, nil otherwise. This function ignores differences in case if case-fold-search is non-nil. (char-equal ?x ?x)
=> t
(char-to-string (+ 256 ?x))
=> "x"
(char-equal ?x (+ 256 ?x))
=> t
t if the characters of the two strings match exactly; case is significant. (string= "abc" "abc")
=> t
(string= "abc" "ABC")
=> nil
(string= "ab" "ABC")
=> nil
The function string= ignores the text properties of the two strings. To compare strings in a way that compares their text properties also, use equal (see Equality Predicates).
string-equal is another name for string=.t. If the lesser character is the one from string2, then string1 is greater, and this function returns nil. If the two strings match entirely, the value is nil. Pairs of characters are compared by their ASCII codes. Keep in mind that lower case letters have higher numeric values in the ASCII character set than their upper case counterparts; numbers and many punctuation characters have a lower numeric value than upper case letters.
(string< "abc" "abd")
=> t
(string< "abd" "abc")
=> nil
(string< "123" "abc")
=> t
When the strings have different lengths, and they match up to the length of string1, then the result is t. If they match up to the length of string2, the result is nil. A string of no characters is less than any other string.
(string< "" "abc")
=> t
(string< "ab" "abc")
=> t
(string< "abc" "")
=> nil
(string< "abc" "ab")
=> nil
(string< "" "")
=> nil
string-lessp is another name for string<.See also compare-buffer-substrings in Comparing Text, for a way to compare text in buffers. The function string-match, which matches a regular expression against a string, can be used for a kind of string comparison; see Regexp Search.