strcmpi
is there a function that compares 2 cstrings, is case insensitive, and ANSI C++?
.lick
strcmpi...
just
if(strcmpi(str1, str2) == 0)
//do something....
Here is another method, but isn''t the fastest... just written off the top of my head though... Check over it before you go using it.
Colby
just
if(strcmpi(str1, str2) == 0)
//do something....
Here is another method, but isn''t the fastest... just written off the top of my head though... Check over it before you go using it.
bool nocasecmp(const char *s1, const char *s2){ // use your method to test for bad pointers here while(*s1 && *s2) { if(toupper(*s1) != toupper(*s2)) return false; s1++; s2++; } if(*s1 || *s2) return false; return true;}
Colby
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement