Terry said:
If the string object contain like below:
string Mystring = " ";
What function should be used for checking the "Mystring" is no
char inside?
What does that mean? That string appears to contain whitespace
characters, either blanks or horizontal tabs. The individual
characters can be examined and possibly classified with such
standard functions as "isprint", "isdigit", "isalpha", etc.
Investigate things defined in ctype.h.
BTW string is not a legal identifier to use. You might have
declared that as"
char Mystring[] = " ";
or
char *Mystring = " ";
(which is not the same thing)
and then scan it with:
for (i = 0; i < strlen(Mystring); i++) {
if (iswhatever((unsigned char)Mystring
)) {
/* do whatever */
}
}