public static boolean containsWhitespace ( final String string ) { for ( int i = 0 ; i < string . length ( ) ; i ++ ) { if ( Character . isWhitespace ( string . charAt ( i ) ) ) { return true ; } } return false ; }
Checks if the given string contains whitespace .