> Suppose you have a multibyte OS such as Japanese. You have two strings
> sourceStr and tokenStr. You want to find out if tokenStr matches sourceStr
> EXACTLY at the very start of sourceStr. We assume that sourceStr is very
> large and tokenStr is small.
Here is a function I wrote to do this:
static Boolean TxtBeginsWith(const Char *inText, const Char *inTokenText)
{
UInt16 len = (UInt16) StrLen(inTokenText);
if (TxtCompare(inText, len, NULL, inTokenText, len, NULL) == 0)
return (true);
return (false);
}
It works fine.
Cheers,
trv
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/