.TH strcpy() "" "" "String Function (libc)"
.PC "Copy one string into another"
.B "#include <string.h>"
\fBchar *strcpy(\fIstring1\^\fB, \fIstring2\^\fB)\fR
\fBchar *\fIstring1\^\fB, *\fIstring2\^\fB;\fR
.PP
.B strcpy()
copies the contents of
.IR string2 ,
up to the NUL, into the memory to which
.I string1
points.
It returns
.IR string1 .
.SH Example
See
.BR string .
.SH "See Also"
.Xr "libc," libc
.Xr "memcpy()," memcpy
.Xr "string.h," string.h
.Xr "strncpy()" strncpy
.br
\*(AS, \(sc7.11.2.3
.br
\*(PX Standard, \(sc8.1
.SH Notes
.I string1
must point to enough space to hold
.IR string2 ,
or another portion of the program or operating system
may be overwritten.
