#include <sys/types.h>
#include <string.h>
|
size_t | strlcpy (char *dst, const char *src, size_t dsize) |
| Safe version of strncpy() from OpenBSD. More...
|
|
- Author
- Todd C. Miller
- Date
- 1998, 2015
- Copyright
- ISC License
◆ strlcpy()
size_t strlcpy |
( |
char * |
dst, |
|
|
const char * |
src, |
|
|
size_t |
dsize |
|
) |
| |
Safe version of strncpy() from OpenBSD.
- Parameters
-
dst | Destination string |
src | Source string |
dsize | Total maximum size of dst |
This function copies string src
to buffer dst
of size dsize
bytes. At most dsize-1 chars will be copied. Always NUL terminates (unless dsize==0).
- Returns
- strlen(src); if retval >= dsize, truncation occurred.