萍聚社区-德国热线-德国实用信息网

 找回密码
 注册

微信登录

微信扫一扫,快速登录

萍聚头条

查看: 799|回复: 0

1-1-19-26 java有无现成的象split函数一样的方法?

[复制链接]
发表于 2003-2-7 01:34 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册 微信登录

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没找到
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
您需要登录后才可以回帖 登录 | 注册 微信登录

本版积分规则

手机版|Archiver|AGB|Impressum|Datenschutzerklärung|萍聚社区-德国热线-德国实用信息网

GMT+1, 2025-3-13 00:44 , Processed in 0.090916 second(s), 16 queries , MemCached On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表