summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strcat.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/strcat.3')
-rw-r--r--src/lib/libc/string/strcat.357
1 files changed, 22 insertions, 35 deletions
diff --git a/src/lib/libc/string/strcat.3 b/src/lib/libc/string/strcat.3
index 5357d65754..fba992edd9 100644
--- a/src/lib/libc/string/strcat.3
+++ b/src/lib/libc/string/strcat.3
@@ -1,3 +1,5 @@
1.\" $OpenBSD: strcat.3,v 1.16 2013/12/19 20:52:37 millert Exp $
2.\"
1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 3.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved. 4.\" All rights reserved.
3.\" 5.\"
@@ -13,11 +15,7 @@
13.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" 2. Redistributions in binary form must reproduce the above copyright
14.\" notice, this list of conditions and the following disclaimer in the 16.\" notice, this list of conditions and the following disclaimer in the
15.\" documentation and/or other materials provided with the distribution. 17.\" documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software 18.\" 3. Neither the name of the University nor the names of its contributors
17.\" must display the following acknowledgement:
18.\" This product includes software developed by the University of
19.\" California, Berkeley and its contributors.
20.\" 4. Neither the name of the University nor the names of its contributors
21.\" may be used to endorse or promote products derived from this software 19.\" may be used to endorse or promote products derived from this software
22.\" without specific prior written permission. 20.\" without specific prior written permission.
23.\" 21.\"
@@ -33,62 +31,51 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 32.\" SUCH DAMAGE.
35.\" 33.\"
36.\" from: @(#)strcat.3 5.6 (Berkeley) 6/29/91 34.Dd $Mdocdate: December 19 2013 $
37.\" $Id: strcat.3,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $
38.\"
39.Dd June 29, 1991
40.Dt STRCAT 3 35.Dt STRCAT 3
41.Os 36.Os
42.Sh NAME 37.Sh NAME
43.Nm strcat 38.Nm strcat
44.Nd concatenate strings 39.Nd concatenate two strings
45.Sh SYNOPSIS 40.Sh SYNOPSIS
46.Fd #include <string.h> 41.In string.h
47.Ft char * 42.Ft char *
48.Fn strcat "char *s" "const char *append" 43.Fn strcat "char *s" "const char *append"
49.Ft char *
50.Fn strncat "char *s" "const char *append" "size_t count"
51.Sh DESCRIPTION 44.Sh DESCRIPTION
52The 45The
53.Fn strcat 46.Fn strcat
54and 47function appends a copy of the NUL-terminated string
55.Fn strncat
56functions
57append a copy of the null-terminated string
58.Fa append 48.Fa append
59to the end of the null-terminated string 49to the end of the NUL-terminated string
60.Fa s , 50.Fa s ,
61then add a terminating 51then adds a terminating
62.Ql \e0 . 52.Ql \e0 .
63The string 53The string
64.Fa s 54.Fa s
65must have sufficient space to hold the result. 55must have sufficient space to hold the result.
66.Pp
67The
68.Fn strncat
69function
70appends not more than
71.Fa count
72characters.
73.Sh RETURN VALUES 56.Sh RETURN VALUES
74The 57The
75.Fn strcat 58.Fn strcat
76and 59function return the pointer
77.Fn strncat
78functions
79return the pointer
80.Fa s . 60.Fa s .
81.Sh SEE ALSO 61.Sh SEE ALSO
82.Xr bcopy 3 , 62.Xr bcopy 3 ,
83.Xr memccpy 3 , 63.Xr memccpy 3 ,
84.Xr memcpy 3 , 64.Xr memcpy 3 ,
85.Xr memmove 3 , 65.Xr memmove 3 ,
86.Xr strcpy 3 66.Xr strcpy 3 ,
67.Xr strlcpy 3 ,
68.Xr strncat 3 ,
69.Xr wcscat 3 ,
70.Xr wcslcpy 3
87.Sh STANDARDS 71.Sh STANDARDS
88The 72The
89.Fn strcat 73.Fn strcat
90and 74function conforms to
91.Fn strncat
92functions
93conform to
94.St -ansiC . 75.St -ansiC .
76.Sh HISTORY
77The
78.Fn strcat
79function first appeared in the Programmer's Workbench (PWB/UNIX)
80and was ported to
81.At v7 .