summaryrefslogtreecommitdiffstats
path: root/lib/str_cat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/str_cat.c')
-rw-r--r--lib/str_cat.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/str_cat.c b/lib/str_cat.c
new file mode 100644
index 0000000..42723cd
--- /dev/null
+++ b/lib/str_cat.c
@@ -0,0 +1,15 @@
+void
+str_cat(dst, s1, s2)
+ char *dst;
+ char *s1;
+ char *s2;
+{
+ while (*dst = *s1)
+ {
+ s1++;
+ dst++;
+ }
+
+ while (*dst++ = *s2++)
+ ;
+}