aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib/string/strcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/lib/string/strcpy.c')
-rw-r--r--src/kernel/lib/string/strcpy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kernel/lib/string/strcpy.c b/src/kernel/lib/string/strcpy.c
new file mode 100644
index 0000000..bab8535
--- /dev/null
+++ b/src/kernel/lib/string/strcpy.c
@@ -0,0 +1,9 @@
+#include <kernel/lib/string.h>
+
+void strcpy(char *dest, const char *orig)
+{
+ size_t s_orig = strlen(orig);
+
+ for (size_t i = 0; i < s_orig; i++) dest[i] = orig[i];
+ dest[s_orig] = 0;
+} \ No newline at end of file