diff options
Diffstat (limited to 'com32/lib/stpcpy.c')
-rw-r--r-- | com32/lib/stpcpy.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/com32/lib/stpcpy.c b/com32/lib/stpcpy.c new file mode 100644 index 00000000..85fc49d3 --- /dev/null +++ b/com32/lib/stpcpy.c @@ -0,0 +1,23 @@ +/* + * stpcpy.c + * + * stpcpy() + */ + +#include <string.h> + +char *stpcpy(char *dst, const char *src) +{ + char *q = dst; + const char *p = src; + char ch; + + for (;;) { + *q = ch = *p++; + if ( !ch ) + break; + q++; + } + + return q; +} |