C
Christopher Benson-Manica
If you can forgive the mention of a nonStandard library function, can
someone shed some light on where this function came from, and how
widely it's implemented? I had to convince my boss just now that it
was not ANSI, and I'm curious as to the history of this function (as
one might find the history of strdup() interesting).
To bring it on-topic, kind of, I believe this is the gist of how
stpcpy() is implemented:
char *stpcpy( char *dest, const char *source )
{
strcpy( dest, source ); /* all of strcpy()'s conditions must
be met, obviously */
return( dest+strlen(dest) ); /* return pointer to end of dest */
}
someone shed some light on where this function came from, and how
widely it's implemented? I had to convince my boss just now that it
was not ANSI, and I'm curious as to the history of this function (as
one might find the history of strdup() interesting).
To bring it on-topic, kind of, I believe this is the gist of how
stpcpy() is implemented:
char *stpcpy( char *dest, const char *source )
{
strcpy( dest, source ); /* all of strcpy()'s conditions must
be met, obviously */
return( dest+strlen(dest) ); /* return pointer to end of dest */
}