split.n
来自「tcl是工具命令语言」· N 代码 · 共 48 行
N
48 行
'\"'\" 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: split.n,v 1.3 2000/09/07 14:27:51 poenitz Exp $'\" .so man.macros.TH split n "" Tcl "Tcl Built-In Commands".BS'\" Note: do not modify the .SH NAME line immediately below!.SH NAMEsplit \- Split a string into a proper Tcl list.SH SYNOPSIS\fBsplit \fIstring \fR?\fIsplitChars\fR?.BE.SH DESCRIPTION.PPReturns a list created by splitting \fIstring\fR at each characterthat is in the \fIsplitChars\fR argument.Each element of the result list will consist of thecharacters from \fIstring\fR that lie between instances of thecharacters in \fIsplitChars\fR.Empty list elements will be generated if \fIstring\fR containsadjacent characters in \fIsplitChars\fR, or if the first or lastcharacter of \fIstring\fR is in \fIsplitChars\fR.If \fIsplitChars\fR is an empty string then each character of\fIstring\fR becomes a separate element of the result list.\fISplitChars\fR defaults to the standard white-space characters.For example,.CS\fBsplit "comp.unix.misc" .\fR.CEreturns \fB"comp unix misc"\fR and.CS\fBsplit "Hello world" {}\fR.CEreturns \fB"H e l l o { } w o r l d"\fR..SH "SEE ALSO"join(n), list(n), string(n).SH KEYWORDSlist, split, string
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?