string-ci=?, string-ci<?, string-ci>?, string-ci<=?, string-ci>=? - case-insensitive string comparison
(import (rnrs)) ;R6RS
(import (rnrs unicode)) ;R6RS
(import (scheme r5rs)) ;R7RS
(import (scheme char)) ;R7RS
(string-ci=? string1 string2 string3 ...)
(string-ci<? string1 string2 string3 ...)
(string-ci>? string1 string2 string3 ...)
(string-ci<=? string1 string2 string3 ...)
(string-ci>=? string1 string2 string3 ...)
These procedures are similar to
etc., but operate on the case-folded versions of the strings.
Case-folding is done as if by applying
to the strings.
Returns a single value, a boolean.
(string-ci=? "z" "Z") => #t
;; May return #t in R7RS.
(string-ci<? "z" "Z") => #f
;; Can return #f in R7RS, and the characters may not be supported.
(string-ci=? "Straße" "Strasse") => #t
(string-ci=? "Straße" "STRASSE") => #t
(string-ci=? "XAOΣ" "χαoσ") => #t
The basic idea of these procedures is the same in all RnRS revisions.
However, there are some differences.
R5RS and earlier reports only provided two-argument variants.
R6RS implementations are mainly the same, except that they may behave
differently depending on which version of the Unicode standard they
R7RS implementations may lack support for some characters. The order
is also implementation-defined, with lexicographical ordering only
being one option.
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
The wrong number of arguments was passed or an argument was outside its domain.
The assertions described above are errors.
Implementations may signal an error, extend the procedure's
domain of definition to include such arguments,
or fail catastrophically.
These procedures first appeared in R2RS.
This page is part of the
It includes materials from the RnRS documents.
More information can be found at
Markup created by unroff 1.0sc, March 04, 2023.