Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/string/strcpy.3
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
.Ft char * | .Ft char * | ||||
.Fn stpcpy "char * restrict dst" "const char * restrict src" | .Fn stpcpy "char * restrict dst" "const char * restrict src" | ||||
.Ft char * | .Ft char * | ||||
.Fn stpncpy "char * restrict dst" "const char * restrict src" "size_t len" | .Fn stpncpy "char * restrict dst" "const char * restrict src" "size_t len" | ||||
.Ft char * | .Ft char * | ||||
.Fn strcpy "char * restrict dst" "const char * restrict src" | .Fn strcpy "char * restrict dst" "const char * restrict src" | ||||
.Ft char * | .Ft char * | ||||
.Fn strncpy "char * restrict dst" "const char * restrict src" "size_t len" | .Fn strncpy "char * restrict dst" "const char * restrict src" "size_t len" | ||||
.Sh ADMONISHMENT | |||||
YOU SHOULD ALMOST CERTAINLY USE | |||||
.Fn strlcpy | |||||
INSTEAD. | |||||
pauamma_gundo.com: I find that wording (and specifically "admonishement") very patronizing. If I were about to use… | |||||
.Pp | |||||
See | |||||
.Em SECURITY CONSIDERATIONS | |||||
section below. | |||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Fn strcpy | .Fn strcpy | ||||
and | and | ||||
.Fn stpcpy | .Fn stpcpy | ||||
functions | functions | ||||
copy the string | copy the string | ||||
.Fa src | .Fa src | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |
I find that wording (and specifically "admonishement") very patronizing. If I were about to use this function and reading this, I would almost certainly think "... Yeah, no. I know what I'm doing, thank-you-very-much." (Whether hypothetical!me actually would is irrelevant here.)