public String splitNameByUpperCase ( String name ) { String [ ] texts = name . split ( "(?=\\p{Upper})" ) ; StringBuilder stringToReturn = new StringBuilder ( ) ; for ( String string : texts ) { if ( stringToReturn . length ( ) > 0 ) { stringToReturn . append ( " " + string . toLowerCase ( ) ) ; } else { stringToReturn . append ( string . toLowerCase ( ) ) ; } } return stringToReturn . toString ( ) ; }
Splits a name by upper case .