OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tcl8.6.12 / doc / concat.n
1 '\"
2 '\" Copyright (c) 1993 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4 '\"
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 '\"
8 .TH concat n 8.3 Tcl "Tcl Built-In Commands"
9 .so man.macros
10 .BS
11 '\" Note:  do not modify the .SH NAME line immediately below!
12 .SH NAME
13 concat \- Join lists together
14 .SH SYNOPSIS
15 \fBconcat\fI \fR?\fIarg arg ...\fR?
16 .BE
17 .SH DESCRIPTION
18 .PP
19 This command joins each of its arguments together with spaces after
20 trimming leading and trailing white-space from each of them.  If all of the
21 arguments are lists, this has the same effect as concatenating them
22 into a single list.
23 Arguments that are empty (after trimming) are ignored entirely.
24 It permits any number of arguments;
25 if no \fIarg\fRs are supplied, the result is an empty string.
26 .SH EXAMPLES
27 Although \fBconcat\fR will concatenate lists, flattening them in the process
28 (so giving the following interactive session):
29 .PP
30 .CS
31 \fI%\fR \fBconcat\fR a b {c d e} {f {g h}}
32 \fIa b c d e f {g h}\fR
33 .CE
34 .PP
35 it will also concatenate things that are not lists, as can be seen from this
36 session:
37 .PP
38 .CS
39 \fI%\fR \fBconcat\fR " a b {c   " d "  e} f"
40 \fIa b {c d e} f\fR
41 .CE
42 .PP
43 Note also that the concatenation does not remove spaces from the middle of
44 values, as can be seen here:
45 .PP
46 .CS
47 \fI%\fR \fBconcat\fR "a   b   c" { d e f }
48 \fIa   b   c d e f\fR
49 .CE
50 .PP
51 (i.e., there are three spaces between each of the \fBa\fR, the \fBb\fR and the
52 \fBc\fR).
53 .SH "SEE ALSO"
54 append(n), eval(n), join(n)
55 .SH KEYWORDS
56 concatenate, join, list
57 '\" Local Variables:
58 '\" mode: nroff
59 '\" End: