NAME

strcat, strncat – concatenate strings

LIBRARY

Standard C Library (libc, -lc)

SYNOPSIS

#include <string.h>

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

char *
strncat(char *restrict s1, const char *restrict s2, size_t n);

ADMONISHMENT

YOU SHOULD ALMOST CERTAINLY USE strlcat() INSTEAD.

DESCRIPTION

The strcat() and strncat() functions append a copy of the null-terminated string s2 to the end of the null-terminated string s1, then add a terminating '\0'.

2026

2025

2022

2020

2017

2015

2013

2011

2010