1Tcl_Concat(3) Tcl Library Procedures Tcl_Concat(3)
2
3
4
5______________________________________________________________________________
6
8 Tcl_Concat - concatenate a collection of strings
9
11 #include <tcl.h>
12
13 const char *
14 Tcl_Concat(argc, argv)
15
17 int argc (in) Number of strings.
18
19 const char *const argv[] (in) Array of strings to concatenate.
20 Must have argc entries.
21_________________________________________________________________
22
23
25 Tcl_Concat is a utility procedure used by several of the Tcl commands.
26 Given a collection of strings, it concatenates them together into a
27 single string, with the original strings separated by spaces. This
28 procedure behaves differently than Tcl_Merge, in that the arguments are
29 simply concatenated: no effort is made to ensure proper list structure.
30 However, in most common usage the arguments will all be proper lists
31 themselves; if this is true, then the result will also have proper
32 list structure.
33
34 Tcl_Concat eliminates leading and trailing white space as it copies
35 strings from argv to the result. If an element of argv consists of
36 nothing but white space, then that string is ignored entirely. This
37 white-space removal was added to make the output of the concat command
38 cleaner-looking.
39
40 The result string is dynamically allocated using Tcl_Alloc; the caller
41 must eventually release the space by calling Tcl_Free.
42
44 Tcl_ConcatObj
45
47 concatenate, strings
48
49
50
51Tcl 7.5 Tcl_Concat(3)