I am very new to C, so please bear with me.
I have written the following function...
It is supposed to loop through every character of the variable text and check to see if it is upper case, by comparing it with the uppercase equivialant of it.Code:const char *RemoveUpper(unsigned char *text) { int i = 0, len = strlen(text); static unsigned char new_str[4096]; while (len > 0) { if (*text == toupper(*text)) { new_str[i] = *text; } i++; text++; len--; } new_str[i] = 0; return new_str; }
It seems to only return a single character.
What am I doing wrong here?
Thanks
~Phil~



LinkBack URL
About LinkBacks



I used to be an adventurer like you... then I took an arrow to the knee.