On Tue, Jul 08, 2003 at 11:00:26AM -0400, Alexander R. Pruss wrote: > 1. There is no guarantee that every bit of text in a record is followed > eventually by a null, right? (There is, e.g., no guarantee that there is > a function at the end of a record, or a terminating null?)
I don't think so. If you crack open a .pdb you'll probably find that each individual records are split up by a NULL character, but that's only there as a placeholder for the benifit of functions like DmQueryRecord(), etc. > 2. Can multi-byte encoded texts have nulls that do not signal the end of > the string, i.e., nulls in the middle of multi-byte characters? (I assume > there can't be nulls at the start of them--if there can, our code is in > trouble.) Uhmm.. although this isn't my area of expertise, but I don't think so either. If there were alot of other programs would probably be in trouble as well :) > 3. At one point in the code I'd like to skip to the next function or to a > specified offset N in a string, whichever is closer. Any bright ideas on > how to do this quickly? Of course the easy way is to loop using > TxtGlueGetNextChar(). But TxtGlueGetNextChar(), I expect, slows things > down. If the answer to #2 is negative, then this is easy--I just scan > ahead character by character to a null. What about alteast identifying whether or not you're looking at a multi-byte character set... if you are then use TxtGlueGetNextChar() but if you're not then just traverse it manually. -- Adam McDaniel Array.org Calgary, AB, Canada _______________________________________________ plucker-dev mailing list [EMAIL PROTECTED] http://lists.rubberchicken.org/mailman/listinfo/plucker-dev