src/main/java/me/codeboy/common/base/util/CBStringUtil.java
public static int containStatistics(String srcString, String desString) {
        int length = desString.length();
        String newString = srcString.replace(desString, "");
        return (srcString.length() - newString.length()) / length;
    }
public static int containStatistics(String srcString, String desString) {
        int length = desString.length();
        String newString = srcString.replace(desString, "");
        return (srcString.length() - newString.length()) / length;
    }
含子串的次数

@param srcString 原串
@param desString 目标子串
@return 次数