split (n)
Split a string into a proper Tcl list
SYNOPSIS
split string ?splitChars?
DESCRIPTION
Returns a list created by splitting string at each character
that is in the splitChars argument.
Each element of the result list will consist of the
characters from string that lie between instances of the
characters in splitChars.
Empty list elements will be generated if string contains
adjacent characters in splitChars, or if the first or last
character of string is in splitChars.
If splitChars is an empty string then each character of
string becomes a separate element of the result list.
SplitChars defaults to the standard white-space characters.
For example,
split "comp.unix.misc" .
returns "comp unix misc" and
split "Hello world" {}
returns "H e l l o { } w o r l d".
KEYWORDS
list, split, string
'\"
'\" Copyright (c) 1996, Expert Interface Technologies
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" The definitions below are for supplemental macros used in Tix
'\" manual entries.
'\"
'\" .HS name section [date [version]]
'\" Replacement for .TH in other man pages. See below for valid
'\" section names.
'\"
'\" .AP type name in/out [indent]
'\" Start paragraph describing an argument to a library procedure.
'\" type is type of argument (int, etc.), in/out is either "in", "out",
'\" or "in/out" to describe whether procedure reads or modifies arg,
'\" and indent is equivalent to second arg of .IP (shouldn't ever be
'\" needed; use .AS below instead)
'\"
'\" .AS [type [name]]
'\" Give maximum sizes of arguments for setting tab stops. Type and
'\" name are examples of largest possible arguments that will be passed
'\" to .AP later. If args are omitted, default tab stops are used.
'\"
'\" .BS
'\" Start box enclosure. From here until next .BE, everything will be
'\" enclosed in one large box.
'\"
'\" .BE
'\" End of box enclosure.
'\"
'\" .VS
'\" Begin vertical sidebar, for use in marking newly-changed parts
'\" of man pages.
'\"
'\" .VE
'\" End of vertical sidebar.
'\"
'\" .DS
'\" Begin an indented unfilled display.
'\"
'\" .DE
'\" End of indented unfilled display.
'\"
|
|