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

# case-fold-up-char

## Name

case-fold-up-char -- Return the uppercase form of a single character

## Synopsis

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

## Description

Returns the uppercase form of `ch` if `ch` is a member of `lowercase-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-up-char ch #!optional (uc-list default-uppercase-list)
    					 (lc-list default-lowercase-list))
      ;; Return the uppercase form of a single character
      (let ((idx (list-member-find ch lc-list)))
        (if (>= idx 0)
    	(list-ref uc-list idx)
    	ch)))

Prev | Home | Next
case-fold-down-char | Up | case-fold-down-charlist