For parsers where performance is critical, you really can’t beat using old-school C strings. Considering the following code:
You may also consider creating your own version of isdigit with something like this:
bool IsDigitOrNum(char c) {
switch (c) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '.':
case 'e':
case '-':
case '+':
return true;
default:
return false;
}
}