mirror of
https://github.com/fluencelabs/musl
synced 2025-06-15 16:01:41 +00:00
9 lines
170 B
C
9 lines
170 B
C
#include <string.h>
|
|
|
|
size_t strlcat(char *d, const char *s, size_t n)
|
|
{
|
|
size_t l = strnlen(d, n);
|
|
if (l == n) return l + strlen(s);
|
|
return l + strlcpy(d+l, s, n-l);
|
|
}
|