Java判斷字符串中某個字符出現的次數

int count = 0,index = 0; while((index = sql.indexOf("=",index)) != -1) { count++; index += 1; }
相關文章
相關標籤/搜索