#include <ctype.h>
|
int
tolower (int c); |
The functionality of this API is independent of the programs current locale.
#include<ctype.h> //tolower() #include<stdio.h> //printf() int test_tolower () { struct st { int input; int output; }; struct st arr[]= { { Q, q }, { g , g }, { 9 , 9 }, { % , % }, { \t , \t }, }; int i = 0; int size = 5; for( i=0; i<size; i++) { int ret = tolower(arr[i].input);//call to the API with the chars in the arr[] if( ret != arr[i].output ) { printf("\n%c cannot convert ", arr[i].input); } else { printf("\n%c ", arr[i].output); } } printf("\n"); }
Output
q g 9 %
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |