@ Function public static String randomizeLetterCase ( String text ) { StringBuilder result = new StringBuilder ( ) ; for ( int i = 0 ; i < text . length ( ) ; i ++ ) { char c = text . charAt ( i ) ; if ( RANDOM . nextBoolean ( ) ) { c = toUpperCase ( c ) ; } else { c = toLowerCase ( c ) ; } result . append ( c ) ; } return result . toString ( ) ; }
Takes a string and randomizes which letters in the text are upper or lower case