String (List<String> lines, int[] indentArray) { int i = 0; StringBuilder result = new StringBuilder(); for (String line : lines) { if (!StringUtil.isEmpty(line)) { line = Strings.padStart(line, indentArray[i] + line.length(), ' '); } i++; result.append(line); if (i < lines.size()) { result.append("\n"); } } return result.toString(); }