aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib/string/strcat.c
diff options
context:
space:
mode:
authorMarvin Borner2019-12-07 13:40:28 +0100
committerMarvin Borner2019-12-07 13:40:28 +0100
commitd94b024b73aeca06de417e0fd3c502495312a8b2 (patch)
treebff5cc1b757eeed7f58878cc13551c63464c5a31 /src/kernel/lib/string/strcat.c
parent322167ceab19588473f9074e761390fdeb701790 (diff)
Added userspace libc and began userspace based shell
Diffstat (limited to 'src/kernel/lib/string/strcat.c')
-rw-r--r--src/kernel/lib/string/strcat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/lib/string/strcat.c b/src/kernel/lib/string/strcat.c
new file mode 100644
index 0000000..e0d6885
--- /dev/null
+++ b/src/kernel/lib/string/strcat.c
@@ -0,0 +1,10 @@
+#include <kernel/lib/string.h>
+
+void strcat(char *dest, const char *orig)
+{
+ size_t s_dest = strlen(dest);
+ size_t s_orig = strlen(orig);
+
+ for (size_t i = 0; i < s_orig; i++) dest[s_dest + i] = orig[i];
+ dest[s_dest + s_orig] = 0;
+} \ No newline at end of file