join.n
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:1k
- '"
- '" Copyright (c) 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: join.n,v 1.3.18.1 2004/10/27 12:52:40 dkf Exp $
- '"
- .so man.macros
- .TH join n "" Tcl "Tcl Built-In Commands"
- .BS
- '" Note: do not modify the .SH NAME line immediately below!
- .SH NAME
- join - Create a string by joining together list elements
- .SH SYNOPSIS
- fBjoin fIlist fR?fIjoinStringfR?
- .BE
- .SH DESCRIPTION
- .PP
- The fIlistfR argument must be a valid Tcl list.
- This command returns the string
- formed by joining all of the elements of fIlistfR together with
- fIjoinStringfR separating each adjacent pair of elements.
- The fIjoinStringfR argument defaults to a space character.
- .SH EXAMPLES
- Making a comma-separated list:
- .CS
- set data {1 2 3 4 5}
- fBjoinfR $data ", "
- fB=> 1, 2, 3, 4, 5fR
- .CE
- .PP
- Using fBjoinfR to flatten a list by a single level:
- .CS
- set data {1 {2 3} 4 {5 {6 7} 8}}
- fBjoinfR $data
- fB=> 1 2 3 4 5 {6 7} 8fR
- .CE
- .SH "SEE ALSO"
- list(n), lappend(n), split(n)
- .SH KEYWORDS
- element, join, list, separator