
Locale Convenience Function
Determines if a character is alphabetic or numeric.
None
#include <locale> template <class charT> bool isalnum (charT c, const locale& loc) const;
The isalnum function returns true if the character passed as a parameter is either part of the alphabet specified by the locale parameter or a decimal digit. Otherwise the function returns false. The check is made using the ctype facet from the locale parameter.
//
// isalnum.cpp
//
#include <iostream>
int main ()
{
using namespace std;
locale loc;
cout << isalnum('a',loc) << endl;
cout << isalnum(',',loc) << endl;
return 0;
}
other is functions, locale, ctype