c++ isalphanum

C++
string test = "Ab4 :";
std::isalnum(test[0]);	//true
std::isalnum(test[1]);	//true
std::isalnum(test[2]);	//true
std::isalnum(test[3]);	//false
std::isalnum(test[4]);	//false
Source

Also in C++: