private static String strip(String address) { return StringUtils.beforeOr(address, '%', address::toString); }
public static String before(String s, char c) { return beforeOr(s, c, () -> { // we throw exception for preserve old behavior throw new IllegalArgumentException("String '" + s + "' must contains '" + c + "'."); }); }