Next: String Searching, Previous: String Modification, Up: Strings
The procedures in this section are similar to the character ordering predicates (see Characters), but are defined on character sequences.
The first set is specified in R5RS and has names that end in ?
.
The second set is specified in SRFI-13 and the names have no ending
?
. The predicates ending in -ci
ignore the character case
when comparing strings.
Lexicographic equality predicate; return
#t
if the two strings are the same length and contain the same characters in the same positions, otherwise return#f
.The procedure
string-ci=?
treats upper and lower case letters as though they were the same character, butstring=?
treats upper and lower case as distinct characters.
Lexicographic ordering predicate; return
#t
if s1 is lexicographically less than s2.
Lexicographic ordering predicate; return
#t
if s1 is lexicographically less than or equal to s2.
Lexicographic ordering predicate; return
#t
if s1 is lexicographically greater than s2.
Lexicographic ordering predicate; return
#t
if s1 is lexicographically greater than or equal to s2.
Case-insensitive string equality predicate; return
#t
if the two strings are the same length and their component characters match (ignoring case) at each position; otherwise return#f
.
Case insensitive lexicographic ordering predicate; return
#t
if s1 is lexicographically less than s2 regardless of case.
Case insensitive lexicographic ordering predicate; return
#t
if s1 is lexicographically less than or equal to s2 regardless of case.
Case insensitive lexicographic ordering predicate; return
#t
if s1 is lexicographically greater than s2 regardless of case.
Case insensitive lexicographic ordering predicate; return
#t
if s1 is lexicographically greater than or equal to s2 regardless of case.
Apply proc_lt, proc_eq, proc_gt to the mismatch index, depending upon whether s1 is less than, equal to, or greater than s2. The mismatch index is the largest index i such that for every 0 <= j < i, s1[j] = s2[j] – that is, i is the first position that does not match.
Apply proc_lt, proc_eq, proc_gt to the mismatch index, depending upon whether s1 is less than, equal to, or greater than s2. The mismatch index is the largest index i such that for every 0 <= j < i, s1[j] = s2[j] – that is, i is the first position that does not match. The character comparison is done case-insensitively.
Return
#f
if s1 and s2 are not equal, a true value otherwise.
Return
#f
if s1 and s2 are equal, a true value otherwise.
Return
#f
if s1 is greater or equal to s2, a true value otherwise.
Return
#f
if s1 is less or equal to s2, a true value otherwise.
Return
#f
if s1 is greater to s2, a true value otherwise.
Return
#f
if s1 is less to s2, a true value otherwise.
Return
#f
if s1 and s2 are not equal, a true value otherwise. The character comparison is done case-insensitively.
Return
#f
if s1 and s2 are equal, a true value otherwise. The character comparison is done case-insensitively.
Return
#f
if s1 is greater or equal to s2, a true value otherwise. The character comparison is done case-insensitively.
Return
#f
if s1 is less or equal to s2, a true value otherwise. The character comparison is done case-insensitively.
Return
#f
if s1 is greater to s2, a true value otherwise. The character comparison is done case-insensitively.
Return
#f
if s1 is less to s2, a true value otherwise. The character comparison is done case-insensitively.
Compute a hash value for S. the optional argument bound is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
Compute a hash value for S. the optional argument bound is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).