summaryrefslogtreecommitdiffstats
path: root/firmware/libc/strcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/libc/strcat.c')
-rw-r--r--firmware/libc/strcat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/libc/strcat.c b/firmware/libc/strcat.c
new file mode 100644
index 0000000000..221529519c
--- /dev/null
+++ b/firmware/libc/strcat.c
@@ -0,0 +1,14 @@
+#include <string.h>
+
+char *strcat(char *s1,
+ const char *s2)
+{
+ char *s = s1;
+
+ while (*s1)
+ s1++;
+
+ while ((*s1++ = *s2++))
+ ;
+ return s;
+}