1concat(n) Tcl Built-In Commands concat(n)
2
3
4
5______________________________________________________________________________
6
8 concat - Join lists together
9
11 concat ?arg arg ...?
12______________________________________________________________________________
13
15 This command joins each of its arguments together with spaces after
16 trimming leading and trailing white-space from each of them. If all of
17 the arguments are lists, this has the same effect as concatenating them
18 into a single list. Arguments that are empty (after trimming) are ig‐
19 nored entirely. It permits any number of arguments; if no args are
20 supplied, the result is an empty string.
21
23 Although concat will concatenate lists, flattening them in the process
24 (so giving the following interactive session):
25
26 % concat a b {c d e} {f {g h}}
27 a b c d e f {g h}
28
29 it will also concatenate things that are not lists, as can be seen from
30 this session:
31
32 % concat " a b {c " d " e} f"
33 a b {c d e} f
34
35 Note also that the concatenation does not remove spaces from the middle
36 of values, as can be seen here:
37
38 % concat "a b c" { d e f }
39 a b c d e f
40
41 (i.e., there are three spaces between each of the a, the b and the c).
42
44 append(n), eval(n), join(n)
45
47 concatenate, join, list
48
49
50
51Tcl 8.3 concat(n)