public static boolean containsWhitespace(CharSequence seq) {
        if (isEmpty(seq)) {
            return false;
        }
        int strLen = seq.length();
        for (int i = 0; i < strLen; i++) {
            if (Character.isWhitespace(seq.charAt(i))) {
                return true;
            }
        }
        return false;
    }
Check whether the given CharSequence contains any whitespace characters.
@param seq the CharSequence to check (may be {@code null})
@return {@code true} if the CharSequence is not empty and
contains at least 1 whitespace character
@see Character#isWhitespace
@since 3.0
android/android_framework/base/src/main/java/lang3/StringUtils.java