libite 2.6.1
strlcat.c File Reference
#include <sys/types.h>
#include <string.h>

Go to the source code of this file.

Functions

size_t strlcat (char *dst, const char *src, size_t dsize)
 

Detailed Description

Author
Todd C. Miller
Date
1998, 2015

Definition in file strlcat.c.

Function Documentation

◆ strlcat()

size_t strlcat ( char * dst,
const char * src,
size_t dsize )

Safe version of strncat() from OpenBSD

Parameters
dstDestination string
srcSource string
dsizeTotal 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.

Definition at line 45 of file strlcat.c.