|
|
@@ -29,13 +29,13 @@ public class ROT13 {
|
|
29
|
29
|
for(int i=0; i<text.length(); i++){
|
|
30
|
30
|
isUppercase = Character.isUpperCase(text.charAt(i));
|
|
31
|
31
|
int temp = Character.toLowerCase(text.charAt(i));
|
|
32
|
|
- if (temp==32){
|
|
|
32
|
+ if (temp<97|temp>122){
|
|
33
|
33
|
} else if(temp+rotator < 122){
|
|
34
|
34
|
temp = (int)text.charAt(i)+rotator;
|
|
35
|
35
|
} else {
|
|
36
|
36
|
temp = 96 + ((temp+rotator)-122);
|
|
37
|
37
|
}
|
|
38
|
|
- if(isUppercase){Character.toUpperCase(temp);}
|
|
|
38
|
+ if(isUppercase){temp=Character.toUpperCase(temp);}
|
|
39
|
39
|
result+= (char)temp;
|
|
40
|
40
|
}
|
|
41
|
41
|
return result;
|