xref: /original-bsd/lib/libc/string/strcat.3 (revision c3e32dec)
1.\" Copyright (c) 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" %sccs.include.redist.man%
9.\"
10.\"     @(#)strcat.3	8.1 (Berkeley) 06/04/93
11.\"
12.Dd
13.Dt STRCAT 3
14.Os
15.Sh NAME
16.Nm strcat
17.Nd concatenate strings
18.Sh SYNOPSIS
19.Fd #include <string.h>
20.Ft char *
21.Fn strcat "char *s" "const char *append"
22.Ft char *
23.Fn strncat "char *s" "const char *append" "size_t count"
24.Sh DESCRIPTION
25The
26.Fn strcat
27and
28.Fn strncat
29functions
30append a copy of the null-terminated string
31.Fa append
32to the end of the null-terminated string
33.Fa s ,
34then add a terminating
35.Ql \e0 .
36The string
37.Fa s
38must have sufficient space to hold the result.
39.Pp
40The
41.Fn strncat
42function
43appends not more than
44.Fa count
45characters.
46.Sh RETURN VALUES
47The
48.Fn strcat
49and
50.Fn strncat
51functions
52return the pointer
53.Fa s .
54.Sh SEE ALSO
55.Xr bcopy 3 ,
56.Xr memccpy 3 ,
57.Xr memcpy 3 ,
58.Xr memmove 3 ,
59.Xr strcpy 3
60.Sh STANDARDS
61The
62.Fn strcat
63and
64.Fn strncat
65functions
66conform to
67.St -ansiC .
68