mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-10 06:16:07 +01:00
d431318022
- GlException and error checking WIP - Put all models within a material in a ModelPool - Instancers directly accept IModels - ModelPools are very WIP
23 lines
533 B
Java
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);
|
|
}
|
|
}
|