@@ -0,0 +1,1071 @@
+public class StringHelpers %7B%0A%09// Return, e.g., 0 for 'a' or 'A', 1 for 'b' or 'B', ... , 25 for 'z' or 'Z'%0A%09public static int getIndexOfLetter(char c) %7B%0A%09%09return (int)(Character.toLowerCase(c) - 'a');%0A%09%7D%0A%0A%09// TODO: Explain this method in English for memory's sake%0A%09public static String caesarShift(String str, int shiftValue)%7B%0A%09%09String out = %22%22;%0A%09%09for(int i = 0; i %3C str.length(); i++) %7B%0A%09%09%09// out += (char)((( (str.toLowerCase().charAt(i) - 'a') + shiftValue ) %25 26) + 'a');%0A%09%09%09int shiftedIndex = (getIndexOfLetter(str.charAt(i)) + shiftValue) %25 26;%0A%09%09%09out += (char)(shiftedIndex + 'a');%0A%09%09%7D%0A%09%09return out;%0A%09%7D%0A%0A%09/*%0A%09*  I took a look at the stuff for changing bases and there's a way in the%0A%09*  Java API, using the Integer class:%0A%09*%0A%09*  To convert to another base:%0A%09*  Integer.toString(int num, int base);%0A%09*%0A%09*  To convert from a base to normal number:%0A%09*  Integer.parseInt(String number_representation, int base);%0A%09*  %0A%09*  So for example, to change from binary to hex:%0A%09*  int binary = 10;%0A%09*  String hexValue = Integer.toString(Integer.parseInt(binary, 2), 16);/%0A%09*/%0A%7D%0A

Create StringHelpers.java