|
SketchyLISP Reference |
Copyright (C) 2007 Nils M Holm |
| <<[string-ci=?] | [Index] | [string-ci>=?]>> |
Conformance: R5RS Scheme
Purpose: Case-insensitively test whether a sequence of strings is in lexically descending order.
Arguments:
X - string
Y... - strings
Implementation:
(define string-ci>?
(letrec
((ci-gt?
(lambda (x y)
(cond ((null? x) #f)
((null? y) #t)
((char-ci<? (car x) (car y)) #f)
((char-ci>? (car x) (car y)) #t)
(else (ci-gt? (cdr x) (cdr y)))))))
(predicate-iterator
(lambda (x y)
(ci-gt? (string->list x)
(string->list y))))))
Example:
(string-ci>? "XYZ" "abc" "AaA") => #t
See also:
string>?,
string-ci<?,
string-ci=?,
string-ci<=?,
string-ci>=?,
char-ci>?,
equal?.
| <<[string-ci=?] | [Index] | [string-ci>=?]>> |