towlower (Windows CE 5.0)
Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Reference
Convert character to lowercase.
int towlower( wint_t c );
Parameters
- c
Character to convert.
Return Values
Each of these routines converts a copy of c, if possible, and returns the result. There is no return value reserved to indicate an error.
Remarks
These functions are supported by all versions of the C run-time libraries.
This routine converts a given uppercase letter to a lowercase letter if possible and appropriate.
Example
Description
This program uses toupper and tolower to analyze all characters between 0x0 and 0x7F. It also applies _toupper and _tolower to any code in this range for which these functions make sense.
Code
#include <conio.h>
#include <ctype.h>
#include <string.h>
char msg[] = "Some of THESE letters are Capitals\r\n";
char *p;
void main( void )
{
_cputs( msg );
/* Reverse case of message. */
for( p = msg; p < msg + strlen( msg ); p++ )
{
if( islower( *p ) )
_putch( _toupper( *p ) );
else if( isupper( *p ) )
_putch( _tolower( *p ) );
else
_putch( *p );
}
}
// Output
Some of THESE letters are Capitals
sOME OF these LETTERS ARE cAPITALS
Requirements
OS Versions: Windows CE 2.0 and later.
Header: condio.h, ctype.h, string.h.
Link Library: coredll.dll.
See Also
Send Feedback on this topic to the authors