strcpy()

copy string 

Function


SYNOPSIS

#include <string.h>

char *strcpy(char *s1, const char *s2);


DESCRIPTION

The strcpy() function copies the string pointed to by s2 (including the terminating null character) into the array pointed to by s1. If copying occurs between objects that overlap, the behavior is undefined.

The function strcpy() does not allocate any storage. The caller must insure that the buffer pointed to by s1 is long enough to hold string s2 and its terminating null character.


PARAMETERS

s1 

Points to destination buffer.

s2 

Points to a null-terminated string.


RETURN VALUES

The strcpy() function returns the value of s1.


CONFORMANCE

ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
memcpy(), strcat(), strdup(), strncpy()


PTC MKS Toolkit 10.4 Documentation Build 39.