Embedded Artistry Framework
Embedded Systems C++ Framework
Functions
strcpy.c File Reference
#include <string.h>
Include dependency graph for strcpy.c:

Functions

char * strcpy (char *__restrict dst, const char *__restrict src)
 Copies the null-terminated byte string pointed to by src to the character array whose first element is pointed to by dest. More...
 

Function Documentation

◆ strcpy()

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

Copies the null-terminated byte string pointed to by src to the character array whose first element is pointed to by dest.

Copies the null-terminated byte string pointed to by src, including the null terminator, to the character array whose first element is pointed to by dest. It may clobber the rest of the destination array with unspecified values and that the following errors are detected at runtime and call the currently installed constraint handler function: The behavior is undefined if the dest array is not large enough. The behavior is undefined if the strings overlap. The behavior is undefined if either dest is not a pointer to a character array or src is not a pointer to a null-terminated byte string. The behavior is undefined if the size of the character array pointed to by dest <= strlen(src, destsz)

Parameters
dstpointer to the character array to write to
srcpointer to the null-terminated byte string to copy from
Returns
a copy of dest

References length, memcpy(), and strlen().

Referenced by char_test(), strcat_test(), strchr_test(), strcpy_test(), strncat_test(), strrchr_test(), strtok_test(), and strxfrm().

Here is the caller graph for this function: