[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
#include <ctype.h>
int tolower( int c );
int _tolower( int c );
#include <wchar.h>
wint_t towlower( wint_t c );
Description:
The tolower function converts c to a lowercase letter if c represents an
uppercase letter.
The _tolower function is a version of tolower to be used only when c is
known to be uppercase.
The towlower function is similar to tolower except that it accepts a
wide-character argument.
Returns:
The tolower function returns the corresponding lowercase letter when the
argument is an uppercase letter; otherwise, the original character is
returned. The towlower function returns the corresponding
wide-character lowercase letter when the argument is a wide-character
uppercase letter; otherwise, the original wide character is returned.
The result of _tolower is undefined if c is not an uppercase letter.
Example:
#include <stdio.h>
#include <ctype.h>
char chars[] = {
'A',
'5',
'$',
'Z'
};
#define SIZE sizeof( chars ) / sizeof( char )
void main()
{
int i;
for( i = 0; i < SIZE; i++ ) {
printf( "%c ", tolower( chars[ i ] ) );
}
printf( "\n" );
}
produces the following:
a 5 $ z
Classification:
tolower is ANSI, _tolower is not ANSI, towlower is ANSI
Systems:
tolower - All, Netware
_tolower - All, Netware
towlower - All, Netware
See Also:
isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct,
isspace, isupper, iswctype, isxdigit, strlwr, strupr, toupper
See Also: iswctype
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson