65 lines
2.5 KiB
Groff
65 lines
2.5 KiB
Groff
|
'\"
|
||
|
'\" Copyright (c) 1989-1993 The Regents of the University of California.
|
||
|
'\" All rights reserved.
|
||
|
'\"
|
||
|
'\" Permission is hereby granted, without written agreement and without
|
||
|
'\" license or royalty fees, to use, copy, modify, and distribute this
|
||
|
'\" documentation for any purpose, provided that the above copyright
|
||
|
'\" notice and the following two paragraphs appear in all copies.
|
||
|
'\"
|
||
|
'\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
|
||
|
'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||
|
'\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
||
|
'\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
'\"
|
||
|
'\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||
|
'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
'\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||
|
'\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
||
|
'\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||
|
'\"
|
||
|
'\" $Header: /user6/ouster/tcl/man/RCS/Concat.3,v 1.6 93/04/01 09:25:23 ouster Exp $ SPRITE (Berkeley)
|
||
|
'\"
|
||
|
.so man.macros
|
||
|
.HS Tcl_Concat tclc
|
||
|
.BS
|
||
|
.SH NAME
|
||
|
Tcl_Concat \- concatenate a collection of strings
|
||
|
.SH SYNOPSIS
|
||
|
.nf
|
||
|
\fB#include <tcl.h>\fR
|
||
|
.sp
|
||
|
char *
|
||
|
\fBTcl_Concat\fR(\fIargc, argv\fR)
|
||
|
.SH ARGUMENTS
|
||
|
.AP int argc in
|
||
|
Number of strings.
|
||
|
.AP char *argv[] in
|
||
|
Array of strings to concatenate. Must have \fIargc\fR entries.
|
||
|
.BE
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
.PP
|
||
|
\fBTcl_Concat\fR is a utility procedure used by several of the
|
||
|
Tcl commands. Given a collection of strings, it concatenates
|
||
|
them together into a single string, with the original strings
|
||
|
separated by spaces. This procedure behaves differently than
|
||
|
\fBTcl_Merge\fR, in that the arguments are simply concatenated:
|
||
|
no effort is made to ensure proper list structure.
|
||
|
However, in most common usage the arguments will all be proper
|
||
|
lists themselves; if this is true, then the result will also have
|
||
|
proper list structure.
|
||
|
.PP
|
||
|
\fBTcl_Concat\fR eliminates leading and trailing white space as it
|
||
|
copies strings from \fBargv\fR to the result. If an element of
|
||
|
\fBargv\fR consists of nothing but white space, then that string
|
||
|
is ignored entirely. This white-space removal was added to make
|
||
|
the output of the \fBconcat\fR command cleaner-looking.
|
||
|
.PP
|
||
|
The result string is dynamically allocated
|
||
|
using \fBmalloc()\fR; the caller must eventually release the space
|
||
|
by calling \fBfree()\fR.
|
||
|
|
||
|
.SH KEYWORDS
|
||
|
concatenate, strings
|