Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

isalpha equivalent for wchar_t

what is the equivalent function for isalpha or isalnum using wchar_t?

wctype ?

an example would be nice also

thanks

like image 796
lj8888 Avatar asked Jul 31 '10 13:07

lj8888


People also ask

What does Isalpha return in C++?

The function isalpha() is used to check that a character is an alphabet or not. This function is declared in “ctype. h” header file. It returns an integer value, if the argument is an alphabet otherwise, it returns zero.

What library is Isalpha in C++?

The isalpha() function is defined in the ctype header file in the C standard library. It is used to check whether a character is an alphabet or not. It returns a non-zero if the character is an alphabet and zero otherwise.


2 Answers

iswalpha, iswalnum. Same usage.

like image 125
Krevan Avatar answered Oct 06 '22 19:10

Krevan


Take a look at std::isaplha<charT> from <locale>. Could use that as std::isalpha<wchar_t>.

like image 38
Dmitry Avatar answered Oct 06 '22 21:10

Dmitry