public static boolean isBlank ( final String source ) { if ( isEmpty ( source ) ) { return true ; } int strLen = source . length ( ) ; for ( int i = 0 ; i < strLen ; i ++ ) { if ( ! Character . isWhitespace ( source . charAt ( i ) ) ) { return false ; } } return true ; }
Returns true if the source string is null or all characters in this string is space ; false otherwise .