Next: SRFI-13 Prefixes/Suffixes, Previous: SRFI-13 Modification, Up: SRFI-13
The procedures in this section are used for comparing strings in
different ways. The comparison predicates differ from those in R5RS in
that they do not only return #t or #f, but the mismatch
index in the case of a true return value.
string-hash and string-hash-ci are for calculating hash
values for strings, useful for implementing fast lookup mechanisms.
Apply lt, eq, or 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.
Compare s1 and s2 and return
#fif the predicate fails. Otherwise, the mismatch index is returned (or end1 in the case ofstring=.
Compare s1 and s2 and return
#fif the predicate fails. Otherwise, the mismatch index is returned (or end1 in the case ofstring=. These are the case-insensitive variants.