2021-09-06 16:14:01 +00:00
|
|
|
.TL
|
|
|
|
strzcpy
|
|
|
|
|
|
|
|
.AU
|
|
|
|
Wael Karram
|
|
|
|
|
|
|
|
.AB no
|
|
|
|
Documentation for strzcpy
|
|
|
|
.AE
|
|
|
|
|
2021-11-10 10:10:34 +00:00
|
|
|
.DA
|
2021-09-06 16:14:01 +00:00
|
|
|
|
2021-11-10 10:10:34 +00:00
|
|
|
.LP
|
2021-09-06 16:14:01 +00:00
|
|
|
The header and implementation file both define a safe string copying function.
|
|
|
|
.br
|
|
|
|
This function takes three arguments:
|
|
|
|
.I "char *restrict dst" ,
|
|
|
|
.I "const char *restrict src" \0and
|
|
|
|
.I "size_t len" ,
|
|
|
|
the first of which is the destination buffer (should have enough space), the second a source buffer,
|
|
|
|
and the third a maximal length to copy.
|
|
|
|
.br
|
|
|
|
Will always produce a null-terminated string copy.
|