Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - Write the code to reverse a string without using Strrev built in function?




308
views
asked marvit August 20, 2014 12:34 AM  

Write the code to reverse a string without using Strrev built in function?


           

1 Answers



 
answered By Dharma   0  
Dim i
Dim iStrLen
Dim strOut
Dim strTmp
Dim strMyString

strString=InputBox("Please enter the string to be
reversed:")
iStrLen = Len(strString)
For i = 0 To Len(strString) - 1
strOut = Mid(strString, iStrLen - i, 1)
strTmp = strTmp & strOut
Next

strMyString = strTmp
msgbox strMyString
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert