function strcount(stra,strb) k=len(stra) strcount=0 for i=1 to k if strb=mid(stra,i,1) then strcount=strcount+1 end if next end function