char ch = input[0];
char ch = str.charAt(0); char[] output1 = new char[outputLength];
    public static String repeat(String str, int repeat) {        if (str == null) {            return null;        }        if (repeat <= 0) {            return "";        }        int inputLength = str.length();        if (inputLength == 1 && repeat <= PAD_LIMIT) {           return padding(repeat, str.charAt(0));        }        char[] input = str.toCharArray();        char[] output = new char[repeat * inputLength];        switch (inputLength) {            case 1:                char ch = input[0];                for (int i = repeat - 1; i >= 0; i--) {                    output[i] = ch;                }                break;            case 2:                char ch0 = input[0];                char ch1 = input[1];                for (int i = repeat * 2 - 2; i >= 0; i--,i--) {                    output[i] = ch0;                    output[i + 1] = ch1;                }                break;            default:                for (int i = repeat - 1; i >= 0; i--) {                    System.arraycopy(input, 0, output, i * inputLength, inputLength);                }                break;                    }        return new String(output);    }