Skip to content
Snippets Groups Projects
Commit 6ccf77df authored by Francesco's avatar Francesco
Browse files

add filesToPlanString method

parent 5331ceee
No related branches found
No related tags found
No related merge requests found
......@@ -240,6 +240,18 @@ public class Tuils {
return Tuils.toPlanString(strings.toArray(object), separator);
}
public static String filesToPlanString(List<File> files, String separator) {
StringBuilder builder = new StringBuilder();
int limit = files.size() - 1;
for (int count = 0; count < files.size(); count++) {
builder.append(files.get(count).getName());
if (count < limit) {
builder.append(separator);
}
}
return builder.toString();
}
public static String toPlanString(List<String> strings) {
return Tuils.toPlanString(strings, "\n");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment