#include <sys/types.h>
#include <string.h>
|
size_t | strlcat (char *dst, const char *src, size_t dsize) |
| Safe version of strncat() from OpenBSD. More...
|
|
- Author
- Todd C. Miller
- Date
- 1998, 2015
- Copyright
- ISC License
◆ strlcat()
size_t strlcat |
( |
char * |
dst, |
|
|
const char * |
src, |
|
|
size_t |
dsize |
|
) |
| |
Safe version of strncat() from OpenBSD.
- Parameters
-
dst | Destination string |
src | Source string |
dsize | Total maximum size of dst |
Appends src
to string dst
of size dsize
(unlike strncat(), dsize
is the full size of dst
, not space left). At most dsize-1 characters will be copied. Always NUL terminates (unless dsize <= strlen(dst)).
- Returns
- strlen(src) + MIN(dsize, strlen(initial dst)). If retval >= dsize, truncation occurred.