OpenBSD manual page server

Manual Page Search Parameters

STRCPY(3) Library Functions Manual STRCPY(3)

strcpycopy a string

#include <string.h>

char *
strcpy(char *dst, const char *src);

The () function copies the string src to dst (including the terminating ‘\0’ character). The string dst must be at least as large as src to hold the result.

If the src and dst strings overlap, the behavior is undefined.

The strcpy() function returns dst.

bcopy(3), memccpy(3), memcpy(3), memmove(3), strcat(3), strlcpy(3), strncpy(3), wcscpy(3), wcslcpy(3)

The strcpy() and strncpy() functions conform to ANSI X3.159-1989 (“ANSI C89”).

The strcpy() function first appeared in the Programmer's Workbench (PWB/UNIX) and was ported to Version 7 AT&T UNIX.

December 19, 2013 OpenBSD-5.5