Concat.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1989-1993 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: Concat.3,v 1.5 2002/08/05 03:24:39 dgp Exp $
- '"
- .so man.macros
- .TH Tcl_Concat 3 7.5 Tcl "Tcl Library Procedures"
- .BS
- .SH NAME
- Tcl_Concat - concatenate a collection of strings
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- CONST char *
- fBTcl_ConcatfR(fIargc, argvfR)
- .SH ARGUMENTS
- .AP int argc in
- Number of strings.
- .AP "CONST char * CONST" argv[] in
- Array of strings to concatenate. Must have fIargcfR entries.
- .BE
- .SH DESCRIPTION
- .PP
- fBTcl_ConcatfR 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_MergefR, 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_ConcatfR eliminates leading and trailing white space as it
- copies strings from fBargvfR to the result. If an element of
- fBargvfR consists of nothing but white space, then that string
- is ignored entirely. This white-space removal was added to make
- the output of the fBconcatfR command cleaner-looking.
- .PP
- .VS
- The result string is dynamically allocated
- using fBTcl_AllocfR; the caller must eventually release the space
- by calling fBTcl_FreefR.
- .VE
- .VS
- .SH "SEE ALSO"
- Tcl_ConcatObj
- .SH KEYWORDS
- concatenate, strings