Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tolower.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tolower.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tolower.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tolower.html on line 8
Convert a character to lowercase
#include <ctype.h>
int tolower( int c );
- c
- The character that you want to convert.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The tolower() function converts c to a lowercase letter,
if c represents an uppercase letter.
The corresponding lowercase letter when the argument is an uppercase letter; otherwise, the original character is
returned.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
char chars[] = {
'A',
'5',
'$',
'Z'
};
#define SIZE sizeof( chars ) / sizeof( char )
int main( void )
{
int i;
for( i = 0; i < SIZE; i++ ) {
printf( "%c ", tolower( chars[ i ] ) );
}
printf( "\n" );
return EXIT_SUCCESS;
}
produces the output:
a 5 $ z
ANSI,
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
Yes |
Signal handler |
Yes |
Thread |
Yes |
isalnum(),
isalpha(),
iscntrl(),
isdigit(),
isgraph(),
islower(),
isprint(),
ispunct(),
isspace(),
isupper(),
isxdigit(),
strlwr(),
strupr(),
toupper()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tolower.html on line 155
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tolower.html on line 155