プライベート静的INT同様にgetCount(文字列str、文字列SUBSTR){
int型の結果= 0;
一方、(str.contains(SUBSTR)){
STR = str.substring(str.indexOf(SUBSTR)+ subStr.length()、str.length())。
結果+ = 1;
}
戻り値の結果;
}
文字が文字列全体に表示された回数を決定します
おすすめ
転載: www.cnblogs.com/topadu/p/11119554.html
おすすめ
ランキング