t3x.org / sketchy / library / s-cilep.html
SketchyLISP
Reference
  Copyright (C) 2007
Nils M Holm

string-ci<=?

Conformance: R5RS Scheme

Purpose: Case-insensitively test whether a sequence of strings is in lexically non-descending order.

Arguments:
X - string
Y... - strings

Implementation:

(define string-ci<=?
  (letrec
    ((ci-le?
       (lambda (x y)
         (cond ((null? x) #t)
           ((null? y) #f)
           ((char-ci<? (car x) (car y)) #t)
           ((char-ci>? (car x) (car y)) #f)
           (else (ci-le? (cdr x) (cdr y)))))))
  (predicate-iterator
    (lambda (x y)
      (ci-le? (string->list x)
              (string->list y))))))

Example:

(string-ci<=? "abc" "ABC" "Zzz") 
=> #t

See also:
string<=?, string-ci<?, string-ci=?, string-ci>?, string-ci>=?, char-ci<=?, equal?.