X-Git-Url: https://pd.if.org/git/?p=zos;a=blobdiff_plain;f=klib%2Fstrcat.c;fp=klib%2Fstrcat.c;h=33e264890010ae942d98773079f24b829e6f80b0;hp=0000000000000000000000000000000000000000;hb=5c0e560e481e2e97b793f7574e849a5882781df9;hpb=e57b692bd3a86ee40fd89416a06fd696f1ff3bf9 diff --git a/klib/strcat.c b/klib/strcat.c new file mode 100644 index 0000000..33e2648 --- /dev/null +++ b/klib/strcat.c @@ -0,0 +1,10 @@ +#include + +char *strcat(char *s1, const char *s2) { + char *rc = s1; + if (*s1) { + while(*++s1); + } + while ( (*s1++ = *s2++) ); + return rc; +}