疯狂的狮子Li
2021-07-12 56322786887f99604450cde07c9cab6fb5ea5135
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.ruoyi.common.utils;
 
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.constant.Constants;
 
/**
 * 字符串工具类
 *
 * @author ruoyi
 */
public class StringUtils extends org.apache.commons.lang3.StringUtils {
    /** 空字符串 */
    private static final String NULLSTR = "";
 
    /** 下划线 */
    private static final char SEPARATOR = '_';
 
    /**
     * 是否为http(s)://开头
     *
     * @param link 链接
     * @return 结果
     */
    public static boolean ishttp(String link) {
        return StrUtil.startWithAny(link, Constants.HTTP, Constants.HTTPS);
    }
 
}