DSSSL Library Reference: Part of the Modular DocBook Stylesheet distribution
Prev |  | Next

# case-fold-down-char

## Name

case-fold-down-char -- Return the lowercase form of a single character

## Synopsis

    (case-fold-down-char ch #!optional (uc-list default-uppercase-list)         (lc-list default-lowercase-list))

## Description

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)))

Prev | Home | Next
default-lowercase-list | Up | case-fold-up-char