Changing the likes of ' azz ' and ' daz ' to ' baa ' and ' dba ' respectively
while ( index >= 0 && t . charAt ( index ) == ' z ' ) { t = t . substring ( 0 , index ) + ' a ' + t . substring ( index + 1 ) ; index -- ; } if ( index >= 0 ) t = t . substring ( 0 , index ) + ( char ) ( ( t . charAt ( index ) ) + 1 ) + t . substring ( index + 1 ) ;