All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.soffa.foundation.commons.UrlUtil Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package io.soffa.foundation.commons;

public final class UrlUtil {

    private UrlUtil() {
    }

    public static String join(String base, String... parts) {
        StringBuilder url = new StringBuilder(base.replaceAll("/+$", ""));
        for (String part : parts) {
            url.append('/').append(part.replaceAll("^/+", ""));
        }
        return url.toString();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy