summaryrefslogtreecommitdiff
path: root/libc/string/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/string.c')
-rw-r--r--libc/string/string.c15
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