IsNullOrWhiteSpace与IsNullOrEmpty

public static boolean IsNullOrEmpty(String value) {
return (value == null || value.length() == 0);
}

public static boolean IsNullOrWhiteSpace(String value) {
if (value == null) return true;

return (value.trim().length() == 0);
}
原文地址:https://www.cnblogs.com/twoheads/p/9970721.html