public static boolean isEmpty ( String [ ] pStringArray ) { // No elements to test if ( pStringArray == null ) { return true ; } // Test all the elements for ( String string : pStringArray ) { if ( ! isEmpty ( string ) ) { return false ; } } // All elements are empty return true ; }
Tests a string array to see if all items are null or an empty string .