void (DocumentEx document, int... offsets) { for (int i = 0; i < offsets.length; i+=3) { int offset = offsets[i]; int oldlength = offsets[i+1]; int newlength = offsets[i+2]; replaceString(document, offset, offset + oldlength, StringUtil.repeatSymbol(' ', newlength)); } }