blob: 30f649986b122e8f86e6519debf4f6b851c9a0c9 [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;
}