I am using TxtGluePrepFindString() to prepare the search string before 
calling TxtGlueFindString().  My question is: How big should I make the 
second input to TxtGluePrepFindString()?

I am currently making it 2 times the size of the findString like this:


size = (StrLen(findString) * 2 + 1;
pattern = MemPtrNew(size);
if (pattern != NULL)
{
                        TxtGluePrepFindString(name, pattern, size);
   if (TxtGlueFindString(searchString, pattern, &pos, &len))
   {
     // Do processing of match
   }
}
MemPtrFree(pattern);


Is this enough?

- Clay


Clay M. Thompson     [EMAIL PROTECTED]      www.creativecreek.com


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