io.github.xtazxz.base.common.utils.NormalizeSpaceUtils Maven / Gradle / Ivy
The newest version!
package io.github.xtazxz.base.common.utils;
import org.apache.commons.lang3.StringUtils;
public class NormalizeSpaceUtils {
public static String normalizeSpace(final String arg) {
return StringUtils.normalizeSpace(arg);
}
public static Object normalizeSpace(final Object arg) {
return StringUtils.normalizeSpace(arg == null ? null : arg.toString());
}
public static Object[] normalizeSpace(final Object[] arguments) {
if (arguments == null || arguments.length == 0) {
return arguments;
}
Object[] newArguments = new Object[arguments.length];
for (int i = 0; i < arguments.length; i++) {
newArguments[i] = normalizeSpace(arguments[i]);
}
return newArguments;
}
}