1; SketchyLISP Library
2; Copyright (C) 2005,2006,2007 Nils M Holm. All rights reserved.
3; See the file LICENSE of the SketchyLISP distribution
4; for conditions of use.
5
6; ---name---
7; char-ci<?
8
9; ---conformance---
10; R5RS
11
12; ---purpose---
13; Case-insensitively test whether a sequence of chars is in
14; lexically ascending order.
15
16; ---args---
17; X - char
18; Y... - chars
19
20; ---keywords---
21; CHAR-CI<? function, chars, characters, comparison,
22; lexical order, ascending, case insensitive
23
24; ---see-also---
25; char<?, char-ci=?, char-ci>?, char-ci<=?, char-ci>=?, string<?, equal?
26
27; ---example---
28; (char-ci<? #\a #\B #\C) => #t
29
30(define c-ciltp #t)
31
32; (require "pred-iter.scm") ; predicate-iterator
33; (load "c-downcase.scm") ; char-downcase
34; (load "less.scm") ; <
35
36; ---model---
37; (define char-ci<?
38;   (predicate-iterator
39;     (lambda (x y)
40;       (< (char->integer (char-downcase x))
41;          (char->integer (char-downcase y))))))
42
43; ---code---
44; This function is a primitive function.
45