It was thus said that the Great Dave McGuire once stated:
That said, also, some strcpy() and memcpy() implementations do deal
with overlapping source/target regions just fine. They're slower,
though...once again spending cycles to compensate for the shortcomings
of programmers who would be better suited to flipping burgers than
writing software.
memcpy() for non-overlapping areas, memmove() for overlapping areas.
strcpy() is undefined for overlapping areas.
Also, the second story on this page:
http://prog21.dadgum.com/9.html is a
rather amusing story about a system version of memcpy() that was faster than
a hand-written, non-generic version.
-spc (Still likes to program in C)