rsFind String in String
-
Greetings All, Is there an API call to find a string within another ? How about with wildcard Chars How about with wildcard char[] (i.e a wildcard that represents any number of chars) ? Cheers If sex is a pain in the ass, then you are doing it wrong!
-
Greetings All, Is there an API call to find a string within another ? How about with wildcard Chars How about with wildcard char[] (i.e a wildcard that represents any number of chars) ? Cheers If sex is a pain in the ass, then you are doing it wrong!
-
Greetings All, Is there an API call to find a string within another ? How about with wildcard Chars How about with wildcard char[] (i.e a wildcard that represents any number of chars) ? Cheers If sex is a pain in the ass, then you are doing it wrong!
try this function. It should work int Compare(const char* mask, const char* s) { const char* cp=0; const char* mp=0; for (; *s&&*mask!='*'; mask++,s++) if (*mask!=*s&&*mask!='?') return 0; for (;;) { if (!*s) { while (*mask=='*') mask++; return !*mask; } if (*mask=='*') { if (!*++mask) return 1; mp=mask; cp=s+1; continue; } if (*mask==*s||*mask=='?') { mask++, s++; continue; } mask=mp; s=cp++; } } "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."