Browse Source

crypt, rotate

Peter McCormick 6 years ago
parent
commit
5c148a667c
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      Crypto/src/ROT13.java

+ 1
- 3
Crypto/src/ROT13.java View File

@@ -38,10 +38,8 @@ public class ROT13  {
38 38
     }
39 39
 
40 40
     public static String rotate(String s, Character c) {
41
-
42
-        int startingIndex = 0;
43 41
         StringBuilder textSB = new StringBuilder();
44
-        startingIndex = s.indexOf(c);
42
+        int startingIndex = s.indexOf(c);
45 43
 
46 44
         for (int i = startingIndex; i < s.length(); i++) {
47 45
             textSB.append(s.charAt(i));