a6b94c4c3febac7ac7104035e3aed04e6d4e9b4d
[musl] / src / string / strlcat.c
1 #include <string.h>
2
3 size_t strlcat(char *d, const char *s, size_t n)
4 {
5         size_t l = strnlen(d, n);
6         if (l == n) return l + strlen(s);
7         return l + strlcpy(d+l, s, n-l);
8 }