]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
3 | .\" Permission is granted to make and distribute verbatim copies of this | |
4 | .\" manual provided the copyright notice and this permission notice are | |
5 | .\" preserved on all copies. | |
6 | .\" | |
7 | .\" Permission is granted to copy and distribute modified versions of this | |
8 | .\" manual under the conditions for verbatim copying, provided that the | |
9 | .\" entire resulting derived work is distributed under the terms of a | |
10 | .\" permission notice identical to this one. | |
11 | .\" | |
12 | .\" Since the Linux kernel and libraries are constantly changing, this | |
13 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
14 | .\" responsibility for errors or omissions, or for damages resulting from | |
15 | .\" the use of the information contained herein. The author(s) may not | |
16 | .\" have taken the same level of care in the production of this manual, | |
17 | .\" which is licensed free of charge, as they might when working | |
18 | .\" professionally. | |
19 | .\" | |
20 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
21 | .\" the source, must acknowledge the copyright and authors of this work. | |
22 | .\" | |
23 | .\" References consulted: | |
24 | .\" Linux libc source code | |
25 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
26 | .\" 386BSD man pages | |
27 | .\" Modified Sat Jul 24 18:11:47 1993 by Rik Faith (faith@cs.unc.edu) | |
28 | .TH STRCAT 3 1993-04-11 "GNU" "Linux Programmer's Manual" | |
29 | .SH NAME | |
30 | strcat, strncat \- concatenate two strings | |
31 | .SH SYNOPSIS | |
32 | .nf | |
33 | .B #include <string.h> | |
34 | .sp | |
35 | .BI "char *strcat(char *" dest ", const char *" src ); | |
36 | .sp | |
37 | .BI "char *strncat(char *" dest ", const char *" src ", size_t " n ); | |
38 | .fi | |
39 | .SH DESCRIPTION | |
63aa9df0 | 40 | The \fBstrcat\fP() function appends the \fIsrc\fP string to the |
fea681da MK |
41 | \fIdest\fP string overwriting the `\\0' character at the end of |
42 | \fIdest\fP, and then adds a terminating `\\0' character. The | |
43 | strings may not overlap, and the \fIdest\fP string must have | |
44 | enough space for the result. | |
45 | .PP | |
63aa9df0 | 46 | The \fBstrncat\fP() function is similar, except that it will use |
fea681da MK |
47 | at most \fIn\fP characters from \fIsrc\fP. |
48 | Since the result is always terminated with `\\0', at most \fIn\fP+1 | |
49 | characters are written. | |
50 | .SH "RETURN VALUE" | |
63aa9df0 | 51 | The \fBstrcat\fP() and \fBstrncat\fP() functions return a pointer |
fea681da MK |
52 | to the resulting string \fIdest\fP. |
53 | .SH "CONFORMING TO" | |
b14d4aa5 | 54 | SVID 3, POSIX, 4.3BSD, ISO 9899 |
fea681da MK |
55 | .SH "SEE ALSO" |
56 | .BR bcopy (3), | |
57 | .BR memccpy (3), | |
58 | .BR memcpy (3), | |
59 | .BR strcpy (3), | |
60 | .BR strncpy (3), | |
61 | .BR wcscat (3), | |
62 | .BR wcsncat (3) |