public class TextUtils {
public static String[] results;
/**
* 分隔符:“.”
*
* @param resource
* @return
*/
public static String[] splite1(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("[.]");
return results;
}
/**
* 分隔符:“|”
*
* @param resource
* @return
*/
public static String[] splite2(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("\|");
return results;
}
/**
* 分隔符:“*”
*
* @param resource
* @return
*/
public static String[] splite3(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("\*");
return results;
}
/**
* 分隔符:“[]”
*
* @param resource
* @return
*/
public static String[] splite4(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("\[\]");
return results;
}
/**
* 分隔符:“”
*
* @param resource
* @return
*/
public static String[] splite5(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("\\");
return results;
}
/**
* 分隔符:“/”
*
* @param resource
* @return
*/
public static String[] splite6(String resource){
if(resource.equals("")){
return null;
}
results = resource.replaceAll("\\","/").split("/");
return results;
}
/**
* 分隔符:“^”
*
* @param resource
* @return
*/
public static String[] splite7(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("\^");
return results;
}
/**
* 分隔符:“-”
*
* @param resource
* @return
*/
public static String[] splite8(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("-");
return results;
}
/**
* 分隔符:“_”
*
* @param resource
* @return
*/
public static String[] splite9(String resource){
if(resource.equals("")){
return null;
}
results = resource.split("_");
return results;
}
}