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