首次提交

This commit is contained in:
tqzhang 2025-01-16 17:30:52 +08:00
parent c4463a05a9
commit 69c561ea4d
1 changed files with 30 additions and 0 deletions

View File

@ -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;
}
}