how to find number of characters(letter a) in
the sentence
Rain Rain Go away
Answer Posted / megha gupta
Dim Str, p,temp,i,l
i=0
Str= inputbox("Enter the string","User input 1")
p= inputbox("Enter the character you want to search in
specified string", "User Input 2")
l= Len(str)
Do while l>0
temp= left(str,1)
str= Right(str,l)
l=l-1
If (temp=p) Then
i=i+1
End If
Loop
Msgbox "Number of times "& p &" character in string is : "&
i &""
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.
How can you create a file object to work with the files in the vbscript language?
Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards
how does vb script help in web page designing? explain with example.
Which command is used for writing text on a page?
Explain the string concatenation function in vbscript?
What are the disadvantages of vbscript?
What are the different types of loops available in the vbscript language?
Mention what is select case statement?
does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks
Compare java script and vb script?
In html file what is an ideal position to include vbscript?
How to open a file. What is the perpose of true and false mode there?
What is the extension of the vbscript file?
What's the difference between vbscript and vb.net?