WARNING: this is a multibyte problem which would be trivial on singlebyte OSs.

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 one solution. Use TxtFindString () to see if there is a match, and
then see if the match is at the beginning of sourceStr. However, this is
extremely wasteful.

Unless I am missing something, I don't see any other solution.

According to the documentation, TxtCompare () is not appropriate for this
job.

Do you? Thanks, Paul N.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to