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

com.github.casside.util.URLUtil Maven / Gradle / Ivy

The newest version!
package com.github.casside.util;

import com.nimbusds.oauth2.sdk.util.URLUtils;
import java.util.List;
import org.springframework.util.CollectionUtils;

public class URLUtil {

    public static String getParam(String url, String name) {
        String[] splits = url.split("\\?");
        if (splits.length > 1) {
            List p = URLUtils.parseParameters(splits[1]).get(name);
            if (!CollectionUtils.isEmpty(p)) {
                return p.get(0);
            }
        }
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy