mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-17 03:05:03 +00:00
Added command to print Botania recipes
This commit is contained in:
1 parent
a0a8f2f26e
commit
0b18e5c12e
6 files changed
+149
-58
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package modtweaker2.helpers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
public class StringHelper {
|
||||
public static List<String> toLowerCase(List<String> stringList) {
|
||||
ListIterator<String> iterator = stringList.listIterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
iterator.set(iterator.next().toLowerCase());
|
||||
}
|
||||
|
||||
return stringList;
|
||||
}
|
||||
|
||||
public static String join(List<String> list, String conjunction) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if(conjunction == null) {
|
||||
conjunction = ", ";
|
||||
}
|
||||
|
||||
if(list != null && !list.isEmpty()) {
|
||||
for(String string : list) {
|
||||
sb.append(string).append(conjunction);
|
||||
}
|
||||
|
||||
sb.setLength(sb.length() - conjunction.length());
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user