Returns the lowercase form of ch if ch is a member of
the uppercase list, otherwise return ch.
The implied mapping from uppercase to lowercase in the two lists is
one-to-one. The first element of the uppercase list is the uppercase
form of the first element of the lowercase list, and vice versa.
ch
The character to fold down.
uc-list
The list of uppercase letters. The default is the list of English
uppercase letters.
lc-list
The list of lowercase letters. The default is the list of English
lowercase letters.
Author
Norman Walsh, <ndw@nwalsh.com>
Source Code
(define (case-fold-down-char ch #!optional (uc-list default-uppercase-list)
(lc-list default-lowercase-list))
;; Return the lowercase form of a single character
(let ((idx (list-member-find ch uc-list)))
(if (>= idx 0)
(list-ref lc-list idx)
ch)))