I have two postcodes char* that I want to compare, ignoring case. Is there a function to do this?
char*
Or do I have to loop through each use the tolower func
static int ignoreCaseComp (const char *str1, const char *str2, int length) { int k; for (k = 0; k < length; k++) { if ((str1[k] | 32) != (str2[k] | 32)) break; } if (k != length) return 1; return 0; }
Reference