Ignazio Di Napoli wrote:
Thank you to all. I simply thought standard strcat managed the overlaps. It's a
little too tricky else... I had already solved my problem (with MemMove, which
I knew handling overlaps), but I just was wondering how a so simple thing was
not contempled...
There are several ways to do what you want, and you are currently using
one method -- MemMove with manual handling the trailing NULL. You could
also simply create a new pointer that is large enough to hold your
resultant string, then copy the string to it, cat the string to it
again, then copy the result back to the string. I wouldn't say that
concatenating overlapping strings is something that people want to do
very often -- but I could be wrong -- so it wasn't built in. If they
built-in extra capacity into a function, then it adds extra overhead for
EVERYONE that wants to use that function, not just those that need that
special handling. If you add a lot of special-case handling into all
your functions, then eventually you end up with something like
WinMobile, instead of PalmOS. Bob
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/