public static String cleanup ( String sequence ) { String result = sequence . replaceAll ( "\\s" , "" ) ; // remove all white // space if ( result . equals ( result . toLowerCase ( ) ) ) { result = result . toUpperCase ( ) ; } return result ; }
remove white space and convert all lower case to upper case