diff --git a/src/main/java/com/bonus/autoweb/UI/frame/StringHelper.java b/src/main/java/com/bonus/autoweb/UI/frame/StringHelper.java new file mode 100644 index 0000000..915eb63 --- /dev/null +++ b/src/main/java/com/bonus/autoweb/UI/frame/StringHelper.java @@ -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; + } +} \ No newline at end of file