Skip to content

Commit

Permalink
Added More Checks
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardJXLi committed Feb 11, 2020
1 parent f1adf4e commit 8433e97
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions Final/src/utils/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,37 @@
char numberC[10][2] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
char oppC[OPPNUM] = {"+-*/%"};

//Checking Different Ascii Character Types
int isNum(char analyze)
{
if (analyze >= '0' && analyze <= '9')
{
return 1;
}
else
{
return 0;
}
if (analyze >= '0' && analyze <= '9'){return True;}
else {return False;}
}

int isAlpha(char analyze)
{
if (analyze >= 'a' && analyze <= 'z'){return True;}
else {return False;}
}

int isCapAlpha(char analyze)
{
if (analyze >= 'A' && analyze <= 'Z'){return True;}
else {return False;}
}

int isHex(char analyze)
{
if (analyze >= 'A' && analyze <= 'F'){return True;}
else {return False;}
}

int isAlphanumerical(char analyze)
{
if (analyze >= '0' && analyze <= '9'){return True;}
else if (analyze >= 'a' && analyze <= 'z'){return True;}
else if (analyze >= 'A' && analyze <= 'Z'){return True;}
else {return False;}
}

//FOR CALC:
Expand Down

0 comments on commit 8433e97

Please sign in to comment.