📄 stringsplit.java
字号:
package PoliceSearch.Com;
/**
* <p>Title: 公安查询系统</p>
* <p>Description: 章桂华</p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: otheno</p>
* @author 章桂华等
* @version 1.0
*/
/**
* <p>Title: 公安查询系统</p>
* <p>Description: 章桂华</p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: otheno</p>
* @author 章桂华等
* @version 1.0
*/
import java.util.*;
public class StringSplit {
public StringSplit() {
}
/**
* @function:toArray,将一长字符串以固定的参数字符串打断
* @Return String[] 返回字符串数组
*/
public static String[] toArray(String ST_StrValues, String ST_StrSplitPara) {
int l, i, j, len1;
Vector Vec_V1 = new Vector();
// String ST_StrValues = new String(strDelValues);
try {
if ( (ST_StrValues == null) || (ST_StrSplitPara == null)) {
String[] ST_StrTemp3 = new String[1];
ST_StrTemp3[0] = "";
return ST_StrTemp3;
}
if (ST_StrSplitPara.length() <= 0) {
String[] ST_StrTemp4 = new String[1];
ST_StrTemp4[0] = ST_StrValues;
return ST_StrTemp4;
}
l = 0;
if (ST_StrValues.length() < 0) {
return null;
}
j = 0;
for (len1 = 0; ST_StrValues.length() > 0; len1++) {
j = ST_StrValues.indexOf(ST_StrSplitPara, 0);
if (j == -1) {
break;
}
else {
Vec_V1.addElement(ST_StrValues.substring(0, j));
ST_StrValues = ST_StrValues.substring(j + ST_StrSplitPara.length(),
ST_StrValues.length());
}
}
Vec_V1.addElement(ST_StrValues);
String[] ST_StrTemp = new String[Vec_V1.size()];
for (i = 0; i < Vec_V1.size(); i++) {
ST_StrTemp[i] = (String) Vec_V1.elementAt(i);
}
Vec_V1.removeAllElements();
return ST_StrTemp;
}
catch (NullPointerException e) {
Log.except(e.toString());
return null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -