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);
}
posted @ 2018-11-16 17:58  twoheads  阅读(323)  评论(0编辑  收藏  举报