welibc
A clear, secure, and well documented standard C library
Functions
strcpy.c File Reference

Defines the strcpy function. More...

#include <string.h>
Include dependency graph for strcpy.c:

Go to the source code of this file.

Functions

char * strcpy (char *s1, const char *s2)
 Copies a string with null terminator from s2 into s1. More...
 

Detailed Description

Defines the strcpy function.

Definition in file strcpy.c.

Function Documentation

◆ strcpy()

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

Copies a string with null terminator from s2 into s1.

Parameters
*s1The destination array
*s2The source string

The strcpy function copies the string pointed to by s2 (including the terminating null character) into the array pointed to by s1.

Note
Copying between overlapping objects is supported, but the source may be overwritten.
Returns
The value of s1

Definition at line 54 of file strcpy.c.

References memmove(), and strlen().

Referenced by strcat(), and strncpy().

Here is the call graph for this function:
Here is the caller graph for this function: