how can i make a function that extracts digits and letters from tokens,i am trying to work on a lexical analyzer in c sharp which extracts variables datatypes liberaries from a cpp file i want my function to extract digits and letters i have managed to make functions that extract variables ,datatypes n libraries
for example i want a combination of these two functions
bool IsDigit(char ch)
{
return (ch >='0' && ch <= '9');
}
bool IsAlpha(char ch)
{
return (ch >='a' && ch <= 'z'|| ch>'A '&& ch<'Z');
}
any ideas??