mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Missing string join method added
This commit is contained in:
@@ -1087,6 +1087,22 @@ public class StringUtil {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String join(final String... strings) {
|
||||
if (strings == null || strings.length == 0) return "";
|
||||
|
||||
final StringBuilder builder = StringBuilderSpinAllocator.alloc();
|
||||
try {
|
||||
for (final String string : strings) {
|
||||
builder.append(string);
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
finally {
|
||||
StringBuilderSpinAllocator.dispose(builder);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String stripQuotesAroundValue(@NotNull String text) {
|
||||
if (startsWithChar(text, '\"') || startsWithChar(text, '\'')) text = text.substring(1);
|
||||
|
||||
Reference in New Issue
Block a user