c++ check if is char code example
Example 1: check if char in string c++
std::string s = "hell[o";
if (s.find('[') != std::string::npos)
; // found
else
; //
Example 2: c++ check if char is number
char c = '1';
bool result = isdigit(c);
cout << result << endl; //1