Flywheel/src/main/java/com/jozufozu/flywheel/util/StringUtil.java
Jozufozu d431318022 Errors and pools
- GlException and error checking WIP
 - Put all models within a material in a ModelPool
 - Instancers directly accept IModels
 - ModelPools are very WIP
2021-08-20 15:05:41 -07:00

23 lines
533 B
Java

package com.jozufozu.flywheel.util;
import java.util.Arrays;
import java.util.stream.Collectors;
public class StringUtil {
public static String args(String functionName, Object... args) {
return functionName + '(' + Arrays.stream(args)
.map(Object::toString)
.collect(Collectors.joining(", ")) + ')';
}
public static String trimEnd(String value) {
int len = value.length();
int st = 0;
while ((st < len) && Character.isWhitespace(value.charAt(len - 1))) {
len--;
}
return value.substring(0, len);
}
}