#include <wctype.h>
|
int
iswpunct (wint_t wch); |
The iswpunct() function tests whether wch can be classfied wide punctuation character i.e. it belongs to class punct(see defns for definition)
The characters that can be classified as alphabets, digits, space or control characters donot belong to punctuation wide-character code.
The result of this function is undefined unless the argument is WEOF or a valid wchar_t value.
The functionality of this API is independent of the programs current locale and so it returns non-zero for all the characters (of various locales supported) that belong to the class punct, irrespective of the locale they belong to.
#include<wctype.h> //iswpunct() #include<stdio.h> //printf() int test_iswpunct() { int arr[]={0x3003,’3’,0x301C,*, +}; int i = 0; int size = 5; for( i=0; i<size; i++) { int ret = iswpunct(arr[i]);//call to the API with chars in arr[] if( (!ret) != 0 ) { printf("\n0x%x is not wide punc char ", arr[i]); } else { printf("\n0x%x is a wide punc char", arr[i]); } } printf("\n"); }
Output
0x3003 is a wide punc char 0 0x33 is not wide punc char 0x301c is a wide punc char 0x2a is a wide punc char 0x2b is a wide punc char
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |