>If we have a pointer myStrP to [perhaps multi-byte] string such as
>
>Char * myStrP;
>Char * chP;
>WChar wch;
>UInt16 i;
>
>chP = myStrP + i;
>
>Here "i" is less than the length of myStrP and points to the beginning of a
>valid character.  Then *chP is chrNull if and only if we are at the end of
>the string or do I still have to do a TxtGetNextChar (chP, 0, &wch) job and
>then check if wch is chrNull?

Any byte value less than 0x40 is guaranteed to be a single byte 
character (not part of a multi-byte character). Thus you can do if 
(*chP == chrNull) without having to use TxtGetNextChar.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
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