blob: 349a617e58028653011868eba74a9833ee1e5bf4 [file]
<html lang="en">
<head>
<title>tolower - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
<link rel="prev" href="toascii.html#toascii" title="toascii">
<link rel="next" href="toupper.html#toupper" title="toupper">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="tolower"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="toupper.html#toupper">toupper</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="toascii.html#toascii">toascii</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
<hr>
</div>
<h3 class="section">3.13 <code>tolower</code>&mdash;translate characters to lowercase</h3>
<p><a name="index-tolower-123"></a><a name="index-g_t_005ftolower-124"></a><strong>Synopsis</strong>
<pre class="example"> #include &lt;ctype.h&gt;
int tolower(int <var>c</var>);
int _tolower(int <var>c</var>);
</pre>
<p><strong>Description</strong><br>
<code>tolower</code> is a macro which converts uppercase characters to lowercase,
leaving all other characters unchanged. It is only defined when
<var>c</var> is an integer in the range <code>EOF</code> to <code>255</code>.
<p>You can use a compiled subroutine instead of the macro definition by
undefining this macro using `<code>#undef tolower</code>'.
<p><code>_tolower</code> performs the same conversion as <code>tolower</code>, but should
only be used when <var>c</var> is known to be an uppercase character (<code>A</code>&ndash;<code>Z</code>).
<p><br>
<strong>Returns</strong><br>
<code>tolower</code> returns the lowercase equivalent of <var>c</var> when it is a
character between <code>A</code> and <code>Z</code>, and <var>c</var> otherwise.
<p><code>_tolower</code> returns the lowercase equivalent of <var>c</var> when it is a
character between <code>A</code> and <code>Z</code>. If <var>c</var> is not one of these
characters, the behaviour of <code>_tolower</code> is undefined.
<p><br>
<strong>Portability</strong><br>
<code>tolower</code> is ANSI C. <code>_tolower</code> is not recommended for portable
programs.
<p>No supporting OS subroutines are required.
<p><br>
</body></html>