Group upper case characters
if ( temp . charAt ( i ) >= ( ' A ' ) && temp . charAt ( i ) <= ( ' Z ' ) ) { while ( i < len && temp . charAt ( i ) >= ( ' A ' ) && temp . charAt ( i ) <= ( ' Z ' ) ) { ans = ans + temp . charAt ( i ) ; i ++ ; } ans = ans + " ▁ " ; }