阅读背景:

防止在字符串JAVA中重复子字符串搜索

来源:互联网 

This is what I did:

这就是我做的:

String[] conjunctions = new String[] {
            "after", "although", "as if",
            "as long as", "as much as", "as soon as",
            "as though", "because", "before", "by the time",
            "even if", "even though", "if",

    };
    for (String toSearch : conjunctions) {
        int occurrence = textToAnalyse.split("(?i)\W" + toSearch +"\W").length - 1;
        System.out.println(toSearch + " X " + occurrence);
    }
String[] conju



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: