string-compare

[procedure] string-compare s1 s2 proc< proc= proc> [start1 end1 start2 end2]

SRFI-13: Apply proc<, proc=, or proc> 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 doesn't match.

See also string-compare-ci.

[procedure] string-compare string1 string2

SRFI-67: Compare strings as string<=?.

Note: compare-string could be defined as

(define (string-compare string1 string2)
  (vector-compare-as-list char-compare
                          string1 string2
                          string-length string-ref))