📄 stringfunction.java
字号:
package com.szmx.tlms.util;
import com.szmx.framework.util.StringUtil;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 2006-8-3
* Time: 14:55:19
* To change this template use File | Settings | File Templates.
*/
public class StringFunction {
public StringFunction() {
}
public static String AutoString(List strList) {
int g = 0;
for (int j = 1; j < strList.size() + 2; j++) {
for (int i = 0; i < strList.size(); i++) {
String s = strList.get(i).toString();
int n = Integer.parseInt(s);
g = n;
if (j == n) {
break;
}
}
if (j == g) {
continue;
}
String sj = String.valueOf(j);
String zz = formatString(sj, 6, "0");
if (zz.equals("999999")) {
return "000000";
}
return formatString(sj, 6, "0");
}
return "";
}
public static String formatString(String value, int length, String fill) {
String result = value;
if (value.length() < length) {
while (length > value.length()) {
result = fill + result;
length = length - 1;
}
}
return result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -