diff options
author | David McCullough <davidm@snapgear.com> | 2001-07-04 11:29:02 +0000 |
---|---|---|
committer | David McCullough <davidm@snapgear.com> | 2001-07-04 11:29:02 +0000 |
commit | f5fc8d4321de6a8cd913bafde705993d96a5e820 (patch) | |
tree | 089bb21da63f63a76a4534cbc040aea854d10cb1 /libc/string/string.c | |
parent | 0d85794e9b8a873a44a373d4936c5c26e1a574c9 (diff) |
Added stpcpy and strcasestr along with some code to test them.
Diffstat (limited to 'libc/string/string.c')
-rw-r--r-- | libc/string/string.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/string/string.c b/libc/string/string.c index 27649b43b..0a1ced8b3 100644 --- a/libc/string/string.c +++ b/libc/string/string.c @@ -58,6 +58,21 @@ char *strcpy(char *dst, const char *src) } #endif +/********************** Function stpcpy ************************************/ + +#ifdef L_stpcpy +char *stpcpy(char *dst, const char *src) +{ + register char *ptr = dst; + + while (*src) + *dst++ = *src++; + *dst = '\0'; + + return dst; +} +#endif + /********************** Function strcmp ************************************/ #ifdef L_strcmp |