There is a name "AJAY" how do u count no.of. "A" in that
name ?

Answers were Sorted based on User's Feedback



There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / ravi

res=split("AJAY","A")
msgbox "No. of A's " & ubound(res)

Is This Answer Correct ?    9 Yes 0 No

There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / swarna

Dim txt, cnt
txt="ajay"
p=split(txt,"a")
cnt=0

for i=1 to ubound(p)
cnt=cnt+1
next

b=cnt
msgbox cnt

Is This Answer Correct ?    5 Yes 0 No

There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / nayana

Dim str

str="ajay"
b=len(str)

for i=1 to b
c=mid(str,i,1)
if c="a" then

d=d+1




end if
next
msgbox d

Is This Answer Correct ?    0 Yes 0 No

There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / sid

Hello All
There is another way of doing this

x="AJAY"
if instr(x,"A")<>0 then
msgbox x
end if

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More QTP Interview Questions

How can we do this one ? at runtime qtpwindow and browser aren't disply on monitor (or) aren't visible on desktop?how?

1 Answers  


i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording

3 Answers   Semantic Space,


How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?

0 Answers  


How can we make a shared object repository in QTP 9?

3 Answers   Kanbay, Ordain Solutions,


How do you data drive an external spreadsheet?

1 Answers  






What is the difference Between LowLevel and Normal Recording Modes?

1 Answers  


To which environments does quicktest professional supports?

0 Answers  


Where can I find and view run-time data table?

0 Answers  


If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?

0 Answers   Ordain Solutions,


what is the difference between DATA TABLE and DATA SET?

2 Answers   Accenture,


can any one tell me How exactly data drivent testing is done in.explain with any example and the exact steps to fallow?

2 Answers  


hi This is Harish.1. What is object repositery .2. what is frame works in QTP,what is keyword driven frame work,explain it and how to associate the folders.3.the build is developed in java, can we write scripting in vb .4.what is discriptive progaram,how to write it.5.what is process of QTp testing.6. how to associate the shared repository. 7.what is implicit and explicit 8.what is runtime data please replay me regards Harish

3 Answers   Syntel,


Categories