public static String nthPowerString(int base, int power) {
        String nthPowerString = "";
        int originalNumber;
        int calculatedNumber;
        int onesDigit; //the ones digit of calculatednumber
        String carryDigits = ""; //carry digits will be added at the end
        if (base < 10 && base > 0) {
            nthPowerString += base; // Takes care of power 1
            if (power == 0) {
            }
            for (int i = 2; i <= power; i++) { //Start at power 2
                // Multiply by the base all the way through the string
                for (int j = nthPowerString.length() - 1; j >= 0; j--) {
                    originalNumber = (int) nthPowerString.charAt(j);
                    originalNumber -= 48; //char numbers start at 48
                    calculatedNumber = originalNumber * 2; //next step
                    if (calculatedNumber < 10) { //only one digit
                        calculatedNumber += 48; //convert it to the char equiv
                        nthPowerString = replaceCharAt(nthPowerString, j,
                                (char) calculatedNumber);
                        carryDigits += "0";
                    } else { //This means there is a carry
                        onesDigit = calculatedNumber % 10; //get the first digit
                        carryDigits = (calculatedNumber - onesDigit) / 10 + carryDigits;
                        onesDigit += 48; // char equivalent
                        nthPowerString = replaceCharAt(nthPowerString, j,
                                (char) onesDigit);
                    }
                    //Add the nth string to the carry string
                    
                }
            }
        } else if (base == 0) {
            return "0";
        } else if (base == 1) {
            return "1";
        } else {
            System.out.println("Cannot compute, base too large.");
        }
        return nthPowerString;
    }