Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/concat.n @ 25

Last change on this file since 25 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 1.6 KB
Line 
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
15concat \- Join lists together
16.SH SYNOPSIS
17\fBconcat\fI \fR?\fIarg arg ...\fR?
18.BE
19
20.SH DESCRIPTION
21.PP
22This command joins each of its arguments together with spaces after
23trimming leading and trailing white-space from each of them.  If all the
24arguments are lists, this has the same effect as concatenating them
25into a single list.
26It permits any number of arguments;
27if no \fIarg\fRs are supplied, the result is an empty string.
28.SH EXAMPLES
29Although \fBconcat\fR will concatenate lists (so the command:
30.CS
31\fBconcat\fR a b {c d e} {f {g h}}
32.CE
33will return
34.QW "\fBa b c d e f {g h}\fR"
35as its result), it will also
36concatenate things that are not lists, and hence the command:
37.CS
38\fBconcat\fR " a b {c   " d "  e} f"
39.CE
40will return
41.QW "\fBa b {c d e} f\fR"
42as its result.
43.PP
44Note that the concatenation does not remove spaces from the middle of
45its arguments, so the command:
46.CS
47\fBconcat\fR "a   b   c" { d e f }
48.CE
49will return
50.QW "\fBa   b   c d e f\fR"
51(i.e. with three spaces between
52the \fBa\fR, the \fBb\fR and the \fBc\fR).
53
54.SH "SEE ALSO"
55append(n), eval(n)
56
57.SH KEYWORDS
58concatenate, join, lists
Note: See TracBrowser for help on using the repository browser.