Dim Str, Schar
Str = inputbox("Enter String: ")
Schar = inputbox("Enter search char.: ")
cnt = len(str)
for i=1 to cnt
char = mid(Str, i, 1)
if ucase(char) = ucase(Schar) then
counter = counter+1
end if
next
msgbox "No of " & Schar & " character in the string " & Str &": " & counter
On Thu, Mar 10, 2011 at 6:11 PM, bnbab <[email protected]> wrote:
> Hi
> I am new to this group
>
> I have a question for VB Scripting in QTP
> like
>
> i have a name : "adarshavivahasatram"
> I want to get a count of "a " howmany a's are there in the above
> name .pls provide me howmany wayswe can get the count of a and let me
> know the code
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en