Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/Concat.3 @ 25

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

added tcl to libs

File size: 1.8 KB
Line 
1'\"
2'\" Copyright (c) 1989-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.3,v 1.9 2005/05/10 18:33:54 kennykb Exp $
9'\"
10.so man.macros
11.TH Tcl_Concat 3 7.5 Tcl "Tcl Library Procedures"
12.BS
13.SH NAME
14Tcl_Concat \- concatenate a collection of strings
15.SH SYNOPSIS
16.nf
17\fB#include <tcl.h>\fR
18.sp
19const char *
20\fBTcl_Concat\fR(\fIargc, argv\fR)
21.SH ARGUMENTS
22.AS "const char *const" argv[]
23.AP int argc in
24Number of strings.
25.AP "const char *const" argv[] in
26Array of strings to concatenate.  Must have \fIargc\fR entries.
27.BE
28
29.SH DESCRIPTION
30.PP
31\fBTcl_Concat\fR is a utility procedure used by several of the
32Tcl commands.  Given a collection of strings, it concatenates
33them together into a single string, with the original strings
34separated by spaces.  This procedure behaves differently than
35\fBTcl_Merge\fR, in that the arguments are simply concatenated:
36no effort is made to ensure proper list structure.
37However, in most common usage the arguments will all be proper
38lists themselves;  if this is true, then the result will also have
39proper list structure.
40.PP
41\fBTcl_Concat\fR eliminates leading and trailing white space as it
42copies strings from \fBargv\fR to the result.  If an element of
43\fBargv\fR consists of nothing but white space, then that string
44is ignored entirely.  This white-space removal was added to make
45the output of the \fBconcat\fR command cleaner-looking.
46.PP
47The result string is dynamically allocated
48using \fBTcl_Alloc\fR;  the caller must eventually release the space
49by calling \fBTcl_Free\fR.
50.SH "SEE ALSO"
51Tcl_ConcatObj
52.SH KEYWORDS
53concatenate, strings
Note: See TracBrowser for help on using the repository browser.