diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2025-06-29 20:48:41 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2025-06-29 20:48:41 -0400 |
| commit | 129a10d1ee57a047ae9a3084e175de1e7daf6ffe (patch) | |
| tree | 079c753b5a9e4856c121a1a2eb59dc6ceba9396f /include/strlcat.h | |
| parent | Ignore .cache (diff) | |
| download | cli-129a10d1ee57a047ae9a3084e175de1e7daf6ffe.zip | |
Fix justify behavior
Diffstat (limited to 'include/strlcat.h')
| -rw-r--r-- | include/strlcat.h | 15 |
1 files changed, 15 insertions, 0 deletions
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 <stddef.h> + +/* + * 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 |