名字

split - 把一个字符串分离成一个恰当的 Tcl 列表

总览

split string ?splitChars?

描述

返回通过把字符串在每个用 splitChars 参数指定的字符上分开而建立的一个列表。结果列表的每个元素都是由位于在 splitChars 中的字符的实例之间的来自 string 的字符组成。如果 string 包含在 splitChars 中毗连的字符,或者 string 的第一个或最后一个字符在 splitChars 中,则生成空列表元素。如果 splitChars 是一个空串,则在 string 中的每个字符都变成结果列表中的一个独立元素。SplitChars 缺省是标准白空格字符。例如,
split "comp.unix.misc" .
返回 "comp unix misc"
split "Hello world" {}
返回 "H e l l o { } w o r l d" 。

关键字

列表, 分离, 字符串
Copyright © 1993 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.

[中文版维护人]

寒蝉退士

[中文版最新更新]

2001/10/30

《中国 Linux 论坛 man 手册页翻译计划》:

www.CMPP.net