|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
发信人: bigfatcat (生存), 信区: Java
标 题: Re: java有无现成的象split函数一样的方法?
发信站: BBS 水木清华站 (Sun Sep 8 23:55:08 2002), 站内信件
java.lang.String类中有
split
public String[] split(String regex)
Splits this string around matches of the given regular expression.
This method works as if by invoking the two-argument split method with the g
iven expression and a limit argument of zero. Trailing empty strings are the
refore not included in the resulting array.
The string "boo:and:foo", for example, yields the following results with the
se expressions:
Regex Result
: { "boo", "and", "foo" }
o { "b", "", ":and:f" }
Parameters:
regex - the delimiting regular expression
Returns:
the array of strings computed by splitting this string around matches of the
given regular expression
Throws:
PatternSyntaxException - if the regular expression's syntax is invalid
NullPointerException - if regex is null
Since:
1.4
See Also:
Pattern
【 在 loveukillu (=我爱恐龙=) 的大作中提到: 】
字符串
在vb和javascript都有
【 在 bigfatcat (生存) 的大作中提到: 】
: 你是指split窗口还是split字符串?
: 在JDK没找到 |
|