日期:2011-10-09  浏览次数:20831 次

GetRepeatTimes(TheChar,TheString)得到一个字符串在另一个字符串当中出现几次的函数()

例子:
response.writeGetRepeatTimes("w","")
response.writeGetRepeatTimes("ww","wwwww")

函数代码:

FunctionGetRepeatTimes(TheChar,TheString)
 GetRepeatTimes=(len(TheString)-len(replace(TheString,TheChar,"")))/len(TheChar)
EndFunction