public static boolean isBlank(final String str) {
        final int strLen;
        if (str != null && (strLen = str.length()) != 0) {
            for (int i = 0; i < strLen; i++) {
                if (!Character.isWhitespace(str.charAt(i))) {
                    return false;
                }
            }
        }
        return true;
    }
Checks if a string is whitespace, empty ("") or null.

Strings.isBlank(null)      = true
Strings.isBlank("")        = true
Strings.isBlank(" ")       = true
Strings.isBlank("bob")     = false
Strings.isBlank("  bob  ") = false
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/Strings.java