org.camunda.bpm.scenario.impl.util.Strings Maven / Gradle / Ivy
package org.camunda.bpm.scenario.impl.util;
/**
* @author Martin Schimak
*/
public class Strings {
public static String leftpad(String text, int length) {
return String.format("%" + length + "." + length + "s", text);
}
public static String rightpad(String text, int length) {
return String.format("%-" + length + "." + length + "s", text);
}
public static String trimAll(String text) {
return text == null ? "" : text.replaceAll("\\s+", " ").trim();
}
}