public cnt_substr(fStr[], sStr[]){ new cnt, pos, tmp new len = strlen(sStr) new max = strlen(fStr)-len+1 while(pos<max && (tmp = contain(fStr[pos], sStr)) != -1){ pos += len+tmp cnt++ } return cnt}