<RefEntry id="case-fold-up-char">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename case-fold-up-char.html>

<RefMeta>
  <RefEntryTitle>case-fold-up-char</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>case-fold-up-char</RefName>
  <RefPurpose>Return the uppercase form of a single character</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(case-fold-up-char ch #!optional (uc-list default-uppercase-list)       (lc-list default-lowercase-list))
</Synopsis>
</RefSynopsisDiv>

<RefSect1><Title>Description</Title>

<para>
Returns the uppercase form of <literal>ch</literal> if <literal>ch</literal> is a member of
<literal>lowercase-list</literal>, otherwise return <literal>ch</literal>.
</para>
<para>
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.
</para>
<variablelist>
<varlistentry><term><literal>ch</literal></term>
<listitem>
<para>
The character to fold down.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>uc-list</literal></term>
<listitem>
<para>
The list of uppercase letters. The default is the list of English 
uppercase letters.
</para>
</listitem>
</varlistentry>
<varlistentry><term><literal>lc-list</literal></term>
<listitem>
<para>
The list of lowercase letters. The default is the list of English 
lowercase letters.
</para>
</listitem>
</varlistentry>
</variablelist>

</RefSect1>

<RefSect1><Title>Author</Title>

<para>
Norman Walsh, &lt;ndw@nwalsh.com&gt;
</para>
</RefSect1>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(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)))
</ProgramListing>
</RefSect1>

</RefEntry>
