Skip to content

Commit cd98961

Browse files
add getCSV variant passing indent as String
1 parent 4b5eb7f commit cd98961

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

sqldev/src/main/java/org/utplsql/sqldev/model/StringTools.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ public class StringTools {
2323
private StringTools() {
2424
super();
2525
}
26-
27-
public static String getCSV(List<String> list, int indentSpaces) {
26+
27+
public static String getCSV(List<String> list, String indent) {
2828
final StringBuilder sb = new StringBuilder();
29-
final String indent = String.join("", Collections.nCopies(indentSpaces, " "));
3029
for (final String item : list) {
3130
if (sb.length() > 0) {
3231
sb.append(",\n");
@@ -40,6 +39,11 @@ public static String getCSV(List<String> list, int indentSpaces) {
4039
return sb.toString();
4140
}
4241

42+
public static String getCSV(List<String> list, int indentSpaces) {
43+
final String indent = String.join("", Collections.nCopies(indentSpaces, " "));
44+
return getCSV(list, indent);
45+
}
46+
4347
public static String getSimpleCSV(List<String> list) {
4448
final StringBuilder sb = new StringBuilder();
4549
for (final String item : list) {
@@ -50,4 +54,5 @@ public static String getSimpleCSV(List<String> list) {
5054
}
5155
return sb.toString();
5256
}
57+
5358
}

0 commit comments

Comments
 (0)