This StrCaselessStr () works well BUT is MUCH slower than StrStr (). Could
you recommend me a faster one? Generally speaking, StrLen (strP) is very
large.
Note. I must be able to search for partial words too so that the standard
Palm OS functions do not seem to help.
Thanks! Best regards, Paul
#############################################################################
static Char * StrCaselessStr (const Char * strP, const Char * tokenP)
{
const Char * occ = NULL;
UInt16 len = StrLen (tokenP);
while (*strP)
{
if (StrNCaselessCompare (tokenP, strP, len) == 0)
{
occ = strP;
break;
}
strP++;
}
return (Char *) occ;
}
#############################################################################
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/