如何检测字符串出现的次数?
Function CheckTheChar(TheChar,TheString)
' TheChar="要检测的字符串".
' TheString="待检测的字符串".
if inStr(TheString,TheChar) then
for n =1 to Len(TheString)
if Mid(TheString,n,Len(TheChar))=TheChar then
CheckTheChar=CheckTheChar+1
End if
Next
CheckTheChar="这个字符"&CheckTheChar&"次"
else
CheckTheChar="0次"
end if
End Function
最后
以上就是精明鲜花最近收集整理的关于如何检测字符串出现的次数?的全部内容,更多相关如何检测字符串出现内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复