question: public static String randomlyRecaseCodePoints ( Random random , String str ) { StringBuilder builder = new StringBuilder ( ) ; int pos = 0 ; while ( pos < str . length ( ) ) { int codePoint = str . codePointAt ( pos ) ; pos += Character . charCount ( codePoint ) ; switch ( nextInt ( random , 0 , 2 ) ) { case 0 : builder . appendCodePoint ( Character . toUpperCase ( codePoint ) ) ; break ; case 1 : builder . appendCodePoint ( Character . toLowerCase ( codePoint ) ) ; break ; case 2 : builder . appendCodePoint ( codePoint ) ; } } return builder . toString ( ) ; }
target:  Randomly upcases, downcases, or leaves intact each code point in the given string