split添加limit参数

String str = "I love you";
/**这里被分割为I 和love you**/
String[] spiltStr = str.spit(" ",2);

String str2 = "192.10.0.1";
/**这里.分割必须加//*/
String[] arr = str2.spit("//.");

 

posted @ 2013-11-21 13:13  爱笑的狐狸  阅读(560)  评论(0编辑  收藏  举报