1join(n)                      Tcl Built-In Commands                     join(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       join - Create a string by joining together list elements
9

SYNOPSIS

11       join list ?joinString?
12_________________________________________________________________
13
14

DESCRIPTION

16       The  list  argument must be a valid Tcl list.  This command returns the
17       string formed by joining all of the  elements  of  list  together  with
18       joinString  separating  each adjacent pair of elements.  The joinString
19       argument defaults to a space character.
20

EXAMPLES

22       Making a comma-separated list:
23              set data {1 2 3 4 5}
24              join $data ", "
25                   → 1, 2, 3, 4, 5
26
27       Using join to flatten a list by a single level:
28              set data {1 {2 3} 4 {5 {6 7} 8}}
29              join $data
30                   → 1 2 3 4 5 {6 7} 8
31
32

SEE ALSO

34       list(n), lappend(n), split(n)
35
36

KEYWORDS

38       element, join, list, separator
39
40
41
42Tcl                                                                    join(n)
Impressum