void (String @NotNull [] lines, int tabSize, int firstLineStartColumn) { if (lines.length == 1) { lines[0] = StringUtil.trimTrailing(lines[0]); } else { int minIndent = firstLineStartColumn; for (int i = 1; i < lines.length; i++) { final String line = lines[i]; int column = 0; for (int j = 0; j < line.length(); j++) { char c = line.charAt(j); if (" \t".indexOf(c) == -1) { if (column < minIndent) minIndent = column; break; } column = nextColumn(column, c, tabSize); if (column >= minIndent) break; } } for (int i = 1; i < lines.length; i++) { final String line = lines[i]; int column = 0; int trimOffset = 0; for (; trimOffset < line.length(); trimOffset++) { column = nextColumn(column, line.charAt(trimOffset), tabSize); if (column > minIndent) break; } lines[i] = StringUtil.trimTrailing(line.substring(trimOffset)); } } }