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

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

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

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

<RefSect1><Title>Description</Title>

<para>
Returns the lowercase form of <literal>ch</literal> if <literal>ch</literal> is a member of
the uppercase list, 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-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)))
</ProgramListing>
</RefSect1>

</RefEntry>
