public static synchronized String rot13 ( String input ) { StringBuffer output = new StringBuffer ( ) ; if ( input != null ) { for ( int i = 0 ; i < input . length ( ) ; i ++ ) { char inChar = input . charAt ( i ) ; if ( ( inChar >= ' ' ) & ( inChar <= ' ' ) ) { inChar += 13 ; if ( inChar > ' ' ) { inChar -= 26 ; } } if ( ( inChar >= ' ' ) & ( inChar <= ' ' ) ) { inChar += 13 ; if ( inChar > ' ' ) { inChar -= 26 ; } } output . append ( inChar ) ; } } return output . toString ( ) ; }
Description of the Method