mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
支付宝参数设置
This commit is contained in:
@@ -224,7 +224,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean isHttp(String link) {
|
||||
return StringUtils.startsWithAny(link, Constants.HTTP, Constants.HTTPS);
|
||||
return StringUtils.startsWithAny(link, Constants.HTTP_PREFIX, Constants.HTTPS_PREFIX);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,10 +234,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
*/
|
||||
public static String removeHttp(String link) {
|
||||
String result;
|
||||
if (StringUtils.startsWith(link, Constants.HTTP)) {
|
||||
result = link.replace(Constants.HTTP, "");
|
||||
} else if (StringUtils.startsWith(link, Constants.HTTPS)) {
|
||||
result = link.replace(Constants.HTTPS, "");
|
||||
if (StringUtils.startsWith(link, Constants.HTTP_PREFIX)) {
|
||||
result = link.replace(Constants.HTTP_PREFIX, "");
|
||||
} else if (StringUtils.startsWith(link, Constants.HTTPS_PREFIX)) {
|
||||
result = link.replace(Constants.HTTPS_PREFIX, "");
|
||||
} else {
|
||||
result = link;
|
||||
}
|
||||
@@ -604,4 +604,17 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method removes '://' from the given URL string.
|
||||
*
|
||||
* @param url the URL string to be processed
|
||||
* @return the processed URL string without '://'
|
||||
*/
|
||||
public static String removeDelimiter(String url) {
|
||||
if (url == null) {
|
||||
return null;
|
||||
}
|
||||
return url.replace(Constants.URL_DELIMITER, "");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user