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 | '\" RCS: @(#) $Id: concat.n,v 1.11 2007/12/13 15:22:32 dgp Exp $ |
---|
9 | '\" |
---|
10 | .so man.macros |
---|
11 | .TH concat n 8.3 Tcl "Tcl Built-In Commands" |
---|
12 | .BS |
---|
13 | '\" Note: do not modify the .SH NAME line immediately below! |
---|
14 | .SH NAME |
---|
15 | concat \- Join lists together |
---|
16 | .SH SYNOPSIS |
---|
17 | \fBconcat\fI \fR?\fIarg arg ...\fR? |
---|
18 | .BE |
---|
19 | |
---|
20 | .SH DESCRIPTION |
---|
21 | .PP |
---|
22 | This command joins each of its arguments together with spaces after |
---|
23 | trimming leading and trailing white-space from each of them. If all the |
---|
24 | arguments are lists, this has the same effect as concatenating them |
---|
25 | into a single list. |
---|
26 | It permits any number of arguments; |
---|
27 | if no \fIarg\fRs are supplied, the result is an empty string. |
---|
28 | .SH EXAMPLES |
---|
29 | Although \fBconcat\fR will concatenate lists (so the command: |
---|
30 | .CS |
---|
31 | \fBconcat\fR a b {c d e} {f {g h}} |
---|
32 | .CE |
---|
33 | will return |
---|
34 | .QW "\fBa b c d e f {g h}\fR" |
---|
35 | as its result), it will also |
---|
36 | concatenate things that are not lists, and hence the command: |
---|
37 | .CS |
---|
38 | \fBconcat\fR " a b {c " d " e} f" |
---|
39 | .CE |
---|
40 | will return |
---|
41 | .QW "\fBa b {c d e} f\fR" |
---|
42 | as its result. |
---|
43 | .PP |
---|
44 | Note that the concatenation does not remove spaces from the middle of |
---|
45 | its arguments, so the command: |
---|
46 | .CS |
---|
47 | \fBconcat\fR "a b c" { d e f } |
---|
48 | .CE |
---|
49 | will return |
---|
50 | .QW "\fBa b c d e f\fR" |
---|
51 | (i.e. with three spaces between |
---|
52 | the \fBa\fR, the \fBb\fR and the \fBc\fR). |
---|
53 | |
---|
54 | .SH "SEE ALSO" |
---|
55 | append(n), eval(n) |
---|
56 | |
---|
57 | .SH KEYWORDS |
---|
58 | concatenate, join, lists |
---|