String (@NotNull String indentation, boolean indentFirst) { final StringBuilder result = new StringBuilder(); boolean first = true; for (String line : myLines) { if (!first) { result.append('\n'); } // Do not add indentation for empty lines if (!StringUtil.isEmptyOrSpaces(line)) { if (!first || indentFirst) { result.append(indentation); } result.append(line); } first = false; } return result.toString(); }