how can we reverse the string without using the revese of
String function in QTP?

Answers were Sorted based on User's Feedback



how can we reverse the string without using the revese of String function in QTP?..

Answer / pillae

Str = "Reverse"
Cnt = Len(Str)
RStr = ""
For i = 1 to Cnt
RStr = Mid(Str,i,1) & RStr
Next
Msgbox RStr

Is This Answer Correct ?    50 Yes 4 No

how can we reverse the string without using the revese of String function in QTP?..

Answer / ramana vanteru

str="ramana"
revstr=strreverse(str)
msgbox revstr

O/P will be: anamar

Is This Answer Correct ?    20 Yes 14 No

how can we reverse the string without using the revese of String function in QTP?..

Answer / digi

IPString="buddy"
Dim StrTemp

StrLen=len(IPString)
For i=0 to len(IPString)-1
StrEachChr=mid(IPString,StrLen-i,1)
StrTemp=StrTemp & StrEachChr
Next

msgbox StrTemp

Is This Answer Correct ?    4 Yes 3 No

how can we reverse the string without using the revese of String function in QTP?..

Answer / mahesh

Dim str,newstr,strrevers
str="QTP"
Set newreg=new regexp
newreg.global="True"
newreg.ignorecase="True"
newreg.pattern=".{1}"
Set newstr=newreg.execute(str)

Dim strarray()
For i=0 to newstr.count-1
ReDim preserve strarray(i)
strarray(i)=newstr.item(i)
Next
For i=0 to ubound(strarray)
strrevers=strarray(i)&strrevers
Next
print strrevers

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Automation Testing AllOther Interview Questions

i have recorded a scrip for some window applicaiton(login screen) and i have used browser as IE and i have executed sucessfully that script. and now i want to execute the same scrip in different browsers and i question is wether it the same script will execute in different browsers or not

2 Answers  


What is difference between selenium and QTP tools Which is best tool... Which is most used tool

0 Answers  


why should I automate mysoftware testing?

3 Answers   IBM,


Do you know what is a data-driven framework?

0 Answers  


how can we reverse the string without using the revese of String function in QTP?

1 Answers  


What do you think holds testers back to do automation? Is there a way to overcome it?

0 Answers  


Explain me what is the difference between setspeed() and sleep() methods?

0 Answers  


Highlight attributes of good framework?

0 Answers  


On what basis we select test cases to automate?

1 Answers  


What testing activities you may want to automate?

1 Answers  


Is automation testing a complete replacement for manual software testing?

0 Answers  


What is Ticketing tool? Has it any other names? What is the purpose of this?

0 Answers  


Categories