#include <ctype.h>
|
|
int
isxdigit (int c); |
The iswxdigit function should be used instead.
| ‘‘0’’ ‘‘1’’ ‘‘2’’ ‘‘3’’ ‘‘4’’
‘‘5’’ ‘‘6’’ ‘‘7’’ ‘‘8’’ ‘‘9’’ ‘‘A’’ ‘‘B’’ ‘‘C’’ ‘‘D’’ ‘‘E’’ ‘‘F’’ ‘‘a’’ ‘‘b’’ ‘‘c’’ ‘‘d’’ ‘‘e’’ ‘‘f’’ |
|
#include<ctype.h> //isxdigit()
#include<stdio.h> //printf()
int test_isxdigit()
{
int arr[]={’F’,’a’,’M’,’9’,’2’};
int i = 0;
int size = 5;
for( i=0; i<size; i++)
{
int ret = isxdigit(arr[i]); //call to the API with chars in arr[]
if( (!ret) != 0 )
{
printf("\n%c is not hex-digit ", arr[i]);
}
else
{
printf("\n%c is hex-digit", arr[i]);
}
}
printf("\n");
}
Output
F is hex-digit
a is hex-digit
M is not hex-digit
9 is hex-digit
2 is hex-digit
|
© 2008-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |