blob: 962d9caa2b5e4c56cb0c5875dc855854c8693590 [file] [log] [blame]
#include <string.h>
char* strncat(char* restrict d, const char* restrict s, size_t n) {
char* a = d;
d += strlen(d);
while (n && *s)
n--, *d++ = *s++;
*d++ = 0;
return a;
}