Created
July 7, 2012 13:27
-
-
Save Xjs/3066483 to your computer and use it in GitHub Desktop.
integerNumber & digit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size_t Parser::integerNumber(size_t index) { | |
char *c_term = term.c_str(); | |
if (c_term[index] == '+' || c_term[index] == '-') | |
index++; | |
while (digit(index)) | |
index++; | |
return index; | |
} | |
int Parser::digit(size_t index) { | |
char *c_term = term.c_str(); | |
return isdigit(c_term[index]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment