e******r 发帖数: 220 | 1 能给举几个例子吗? 比如说如何找'\sd', 然后SPLIT the whole string into
two parts based on '\sd'.
thanks※ 修改:·eecareer 於 Feb 10 19:11:11 2007 修改本文·[FROM: 160.39.] |
g*****g 发帖数: 34805 | 2 String.split("\\sd")
into
【在 e******r 的大作中提到】 : 能给举几个例子吗? 比如说如何找'\sd', 然后SPLIT the whole string into : two parts based on '\sd'. : thanks※ 修改:·eecareer 於 Feb 10 19:11:11 2007 修改本文·[FROM: 160.39.]
|
A**o 发帖数: 1550 | 3 你这个返回的有可能是不止两个呀。
【在 g*****g 的大作中提到】 : String.split("\\sd") : : into
|
g*****g 发帖数: 34805 | 4 有好几个你哪知道是哪个?不过应该是"\\\\sd",\在regex是特殊字符。
【在 A**o 的大作中提到】 : 你这个返回的有可能是不止两个呀。
|
c*********n 发帖数: 128 | 5 indexOf(String str)
Returns the index within this string of the first occurrence of
the specified substring.
Java 的document是我见过的最好的, 你这个问题直接上
http://java.sun.com/j2se/1.5.0/docs/api/
很容易就能找到
into
【在 e******r 的大作中提到】 : 能给举几个例子吗? 比如说如何找'\sd', 然后SPLIT the whole string into : two parts based on '\sd'. : thanks※ 修改:·eecareer 於 Feb 10 19:11:11 2007 修改本文·[FROM: 160.39.]
|
o***g 发帖数: 2784 | 6 java.text.regex.Pattern.split()
into
【在 e******r 的大作中提到】 : 能给举几个例子吗? 比如说如何找'\sd', 然后SPLIT the whole string into : two parts based on '\sd'. : thanks※ 修改:·eecareer 於 Feb 10 19:11:11 2007 修改本文·[FROM: 160.39.]
|
A**o 发帖数: 1550 | 7 我不知道啊,所以才问一问。
【在 g*****g 的大作中提到】 : 有好几个你哪知道是哪个?不过应该是"\\\\sd",\在regex是特殊字符。
|
T*****e 发帖数: 361 | 8 myString.split("\\sd", 2);
or myString.split("\\\\sd", 2) if your '\sd' is not a pattern.
【在 A**o 的大作中提到】 : 你这个返回的有可能是不止两个呀。
|