home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / doc / Concat.3 < prev    next >
Text File  |  1993-04-01  |  3KB  |  65 lines

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