diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:52:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:52:31 (GMT) |
commit | 5bc57d7b0f63d86fc383565d69f7704943fff94d (patch) | |
tree | 3ed6ba33b7a0eb1bb7d89c83f86bb2f420d5284a /doc/join.n | |
parent | 7ea5d4dbe8b82a86701cec95132a8a9557a5f105 (diff) | |
download | tcl-5bc57d7b0f63d86fc383565d69f7704943fff94d.zip tcl-5bc57d7b0f63d86fc383565d69f7704943fff94d.tar.gz tcl-5bc57d7b0f63d86fc383565d69f7704943fff94d.tar.bz2 |
More doc fix backporting
Diffstat (limited to 'doc/join.n')
-rw-r--r-- | doc/join.n | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: join.n,v 1.3 2000/09/07 14:27:48 poenitz Exp $ +'\" RCS: @(#) $Id: join.n,v 1.3.18.1 2004/10/27 12:52:40 dkf Exp $ '\" .so man.macros .TH join n "" Tcl "Tcl Built-In Commands" @@ -24,9 +24,23 @@ This command returns the string formed by joining all of the elements of \fIlist\fR together with \fIjoinString\fR separating each adjacent pair of elements. The \fIjoinString\fR argument defaults to a space character. +.SH EXAMPLES +Making a comma-separated list: +.CS +set data {1 2 3 4 5} +\fBjoin\fR $data ", " + \fB=> 1, 2, 3, 4, 5\fR +.CE +.PP +Using \fBjoin\fR to flatten a list by a single level: +.CS +set data {1 {2 3} 4 {5 {6 7} 8}} +\fBjoin\fR $data + \fB=> 1 2 3 4 5 {6 7} 8\fR +.CE .SH "SEE ALSO" -list(n), lappend(n) +list(n), lappend(n), split(n) .SH KEYWORDS element, join, list, separator |