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

Defines the strcat function. More...

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

Go to the source code of this file.

Functions

char * strcat (char *s1, const char *s2)
 Concatenates two strings. More...
 

Detailed Description

Defines the strcat function.

Definition in file strcat.c.

Function Documentation

◆ strcat()

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

Concatenates two strings.

Parameters
*s1Destination string
*s2String to be appended

The strcat function appends a copy of the string pointed to by s2 (including the terminating null character) to the end of the string pointed to by s1. The initial character of s2 overwrites the null character at the end of s1. If copying takes place between objects that overlap, the behavior is undefined.

Note
If there is no null character in the first n characters of the array pointed to by s2, the result will not be null-terminated.
Copying between overlapping objects is supported, but the source may be overwritten.
Returns
The value of s1

Definition at line 60 of file strcat.c.

References strcpy(), and strlen().

Here is the call graph for this function: