首次提交
This commit is contained in:
parent
c4463a05a9
commit
69c561ea4d
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.bonus.autoweb.UI.frame;
|
||||||
|
|
||||||
|
public class StringHelper {
|
||||||
|
public static boolean isEmpty(String str) {
|
||||||
|
if (str == null || str.trim().equals("") || str.trim().equals("null")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 判断字符串 不为空
|
||||||
|
*/
|
||||||
|
public static boolean isNotEmpty(String str) {
|
||||||
|
return !isEmpty(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isEmptyAndNull(String str) {
|
||||||
|
if (str == null || str.trim().equals("") || str.trim().equals("null")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public static String fillPrefixZero(int v, int len) {
|
||||||
|
String vStr = v + "";
|
||||||
|
while (vStr.length() < len) {
|
||||||
|
vStr = "0" + vStr;
|
||||||
|
}
|
||||||
|
return vStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue