Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21246

how to count occurence of one character in in a string

$
0
0
assume word is " aaeehjsfjhk" now i want to count the total occurence of a in this word how i will do
i tried:
occurence=0
for i=0 to len(word)
if instr(1,word,"a") then
occurence=occurence+1
end if
next

its not working, help me
thanks in adavance:)

Viewing all articles
Browse latest Browse all 21246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>