|
@@ -40,6 +40,28 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ //为null,为"",为 " " --- sunhh
|
|
|
+ public static boolean isEmptySunhh(final Object obj) {
|
|
|
+ int strLen;
|
|
|
+ if (obj == null) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ CharSequence cs = obj.toString().trim();
|
|
|
+ if ((strLen = cs.length()) == 0) {
|
|
|
+ return true;
|
|
|
+ } else if (obj.toString().trim().toLowerCase().equals("null")) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ for (int i = 0; i < strLen; i++) {
|
|
|
+ if (Character.isWhitespace(cs.charAt(i)) == false) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 空字符串
|
|
|
*/
|