int removeLen = endIndex = startIndex;
int removeLen = endIndex - startIndex;
    public StrBuilder replace(int startIndex, int endIndex, String str) {        endIndex = validateRange(startIndex, endIndex);        int insertLen = str.length();        int removeLen = endIndex = startIndex;        int newSize = size - removeLen + insertLen;        if (insertLen > removeLen) {            ensureCapacity(newSize);        }        if (insertLen != removeLen) {            System.arraycopy(buf, endIndex, buf, startIndex + insertLen, size - endIndex);            size = newSize;        }        str.getChars(0, insertLen, buf, startIndex);        return this;    }