Check if wide character has graphical representation
Checks whether c is a wide character with graphical representation.
The characters with graphical representation are all those characters than can be printed (as determined by iswprint) except the espace character (L' ').
This function is the wide-character equivalent of isgraph (<cctype>): If c translates with wctob to a character for which isgraph is true, it is considered a character with graphical representation by this function (except possibly for certain locale-specific printable white-space characters other than L' ').
In C++, a locale-specific template version of this function (isgraph) exists in header <locale> for all character types.
- Wide character to be checked, casted to a wint_t, or WEOF.
wint_t is an integral type.
A value different from zero (i.e., true) if indeed c is a character with graphical representation. Zero (i.e., false) otherwise.
/* iswgraph example */
int main ()
FILE * pFile;
pFile = fopen ("myfile.txt","r");
c = fgetwc (pFile);
if (iswgraph(c)) putwchar (c);
} while (c != WEOF);
This example prints out the contents of "myfile.txt" without spaces and special characters, i.e. only prints out the characters that qualify as iswgraph.
- Check if character has graphical representation (function)
- Check if wide character is printable (function)
- Check if wide character is a white-space (function)
- isgraph (locale)
- Check if character has graphical representation using locale (function template)