summaryrefslogtreecommitdiff
path: root/kernel/lib/stpcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lib/stpcpy.c')
-rw-r--r--kernel/lib/stpcpy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/lib/stpcpy.c b/kernel/lib/stpcpy.c
new file mode 100644
index 0000000..1a7c5bf
--- /dev/null
+++ b/kernel/lib/stpcpy.c
@@ -0,0 +1,9 @@
+#include <lib.h>
+
+char *stpcpy(char *restrict dest, const char *restrict src)
+{
+ char *d = dest;
+ for (; (*d = *src); d++, src++)
+ ;
+ return d;
+}