public static boolean hasText( String str) 如果字符串为 null 、空串(“”)、包含空字符(\n \t 空格)返回 false, 否则返回true。 源码如下: