Happy Thanksgiving if it applies. I am trying to create a function I will be able to use in the future. The function should be able to accept a char array and code it. (I am not finished with the code part)
int codetut(char *codeit){
int x,y = 0;
char tmparry[strlen(codeit)];
while(codeit[x] != '\0'){
if((codeit[x] >= 'a' && codeit[x] <= 'z') || (codeit[x] >= 'A' && codeit[x] <= 'Z')){ //Set to look for capitals and commons
if((codeit[x] == 'a' || codeit[x] == 'e' || codeit[x] == 'i' || codeit[x] == 'o' || codeit[x] == 'u') && (codeit[x] == 'A' || codeit[x] == 'E' || codeit[x] == 'I' || codeit[x] == 'O' || codeit[x] == 'U')){ // set to look for vowels
tmparry[y] = codeit[x];
x++,y++;
}else{
x++,y;
}
}else{
tmparry[y] = codeit[x];
x++,y++;
}
}
printf("%s",tmparry);
return 0;
}
I was looking here how to validate both lowercase and uppercase letters. Unfortunately I did not find what I was looking for.
Question:
- Is there a better way to compare the pointer to both uppercase and lowercase versions?
Just one request, if you know a post that will help me please point me to it.