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

Do you know what is selenese?

0 Answers  


What automated tools are you familiar with?

1 Answers  


Describe some problem that you had with automating testing tool.

0 Answers   Satyam,


Tell us what is the difference between getwindowhandles() and getwindowhandle()?

0 Answers  


Do you know how to check if a button is enabled on the page?

0 Answers  






Define behavioral testing

4 Answers  


What are the main attributes of test automation?

0 Answers  


Tell me what are pros and cons of automating tests at ui layer?

0 Answers  


Explain me what are the main advantages of automation testing?

0 Answers  


hi to all, if we open a browser(for ex. yahoomail.com) using navigate command. the cursor by default focussing on the 'yahoo id' html edit box. how to get the label(ie.,yahoo id) of that html edit box using descriptive program. here we should not use identify tool to get the property,thtml editbox method. by tracing the cursor position we have to get the label name. is it possible? please let me know.

0 Answers  


Differentiate between hdam and hidam database?

0 Answers  


Explain load testing on websites?

0 Answers  


Categories