From 129a10d1ee57a047ae9a3084e175de1e7daf6ffe Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 29 Jun 2025 20:48:41 -0400 Subject: Fix justify behavior --- include/strlcat.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/strlcat.h (limited to 'include/strlcat.h') diff --git a/include/strlcat.h b/include/strlcat.h new file mode 100644 index 0000000..0470b83 --- /dev/null +++ b/include/strlcat.h @@ -0,0 +1,15 @@ +#ifndef HAVE_STRLCAT +#define HAVE_STRLCAT + +#include + +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ +size_t strlcat(char *dst, const char *src, size_t dstsize); + +#endif -- cgit v1.2.3