mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
21 lines
559 B
Java
21 lines
559 B
Java
// "Convert variable 'res' from String to StringBuilder" "true-preview"
|
|
|
|
public class Main {
|
|
String test(String[] strings) {
|
|
/*within*/
|
|
StringBuilder res = new StringBuilder();
|
|
for (String s : strings) {
|
|
if (/*before*/res.length() > 0) {
|
|
res.append(", ");
|
|
}
|
|
if (s.contains("'")) {
|
|
res.append('[' // bracket
|
|
).append(s).append(']');
|
|
} else {
|
|
res.append(s);
|
|
}
|
|
}
|
|
return res.toString();
|
|
}
|
|
}
|