use of processing.data.StringList in project processing by processing.
the class ErrorMessageSimplifier method removePackagePrefixes.
/**
* Converts java.lang.String into String, etc
*/
private static String removePackagePrefixes(String input) {
if (!input.contains(".")) {
return input;
}
String[] names = PApplet.split(input, ',');
// List<String> names = new ArrayList<String>();
// if (inp.indexOf(',') >= 0) {
// names.addAll(Arrays.asList(inp.split(",")));
// } else {
// names.add(inp);
// }
StringList result = new StringList();
for (String name : names) {
int dot = name.lastIndexOf('.');
if (dot >= 0) {
name = name.substring(dot + 1, name.length());
}
result.append(name);
}
return result.join(", ");
}
Aggregations