strlcat.c\string\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/strlcat.c
blob: ef81209e35efeb2ae18e50b4fd99d85ae2aaf924 (plain) (blame)
1
2
3
4
5
6
7
8
9
#define _BSD_SOURCE
#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);
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月06日 05:17:53 +0000

AltStyle によって変換されたページ (->オリジナル) /