Browse Source

Implementation of function isLetterOfAlphabet().

remotes/origin/development
fdai7057 2 years ago
parent
commit
af62069f27
  1. 10
      src/stringManipulation.c
  2. 1
      src/stringManipulation.h

10
src/stringManipulation.c

@ -79,6 +79,16 @@ bool everyCharacterIsDigit(char *string)
return onlyDigits;
}
bool isLetterOfAlphabet(char *string){
bool r = true;
for(int i=0;*(string+i)!='\0';++i){
if( !(*(string+i)>=65&&*(string+i)<=90) && !(*(string+i)>=97&&*(string+i)<=122)){
r = false;
break;
}
}
return r;
}
unsigned int toUnsignedInteger(char *ID)
{

1
src/stringManipulation.h

@ -10,4 +10,5 @@ char *generateCheckString(unsigned int, char *);
unsigned int toUnsignedInteger(char *);
unsigned int power(unsigned int, unsigned int);
bool everyCharacterIsDigit(char *);
bool isLetterOfAlphabet(char *);
#endif
Loading…
Cancel
Save