how to reverse a string with out using string or predefined
function,ex:string is " i love india". the output should be
like this "i evol aidni"

Answers were Sorted based on User's Feedback



how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / mogal

str=" i love india"

StrSpl = Split(str," ")

For j = 0 to Ubound(StrSpl)

result1 = result1 & " " & ReverseStr1(StrSpl(j))
Next

msgbox result1

Function ReverseStr1(Str1)
For i = 1 to Len(Str1)
ReverseStr1 = mid(Str1,i,1) & ReverseStr1
Next
End Function

Is This Answer Correct ?    1 Yes 0 No

how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / lak

str=" i love india"

Set regExpObj=new RegExp
regExpObj.pattern="[a-z A-Z]"
regExpObj.global=true

Set matches=regExpObj.execute(str)
For each letter in matches
result=letter.value&result
Next

msgbox result

Is This Answer Correct ?    0 Yes 1 No

how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / siva

You can use StrReverse syntax

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

What is checkpoints for qtp?

0 Answers  


What is the difference between client server application and web based application?

1 Answers   IBM,


Hi, Can anyone help me with: How to select a value from combobox and check the checkbox and set the filter. I have to set a filter by selecting a value from dropdown. Also, im using UFT 11.5 so can anyone help me with code for UFT. Thanks Sreevidya

1 Answers  


Write the code for select the 5 values from drop down list. drop down list having the 10 values.

6 Answers  


How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?

6 Answers  






how to automate standalone infopath forms using QTP? (it is not a dotnet or a web form)

1 Answers   ABC,


examples of user definied functions? how to write user defined functions in qtp9.2?

3 Answers   IBM,


Which recording modes need more memory?

0 Answers  


If we write a script in the expert view how are the objects created in the object repository? to be clear i will explain my problem first i have recorded the mercurytours application by providing the link www.mercurytours.com and all the objects are stored in the object repository ok this is fine. but i have copied the script generated in the above processes and pasted in a new test and tried to run that script but as the objects were not stored in the object repository it showed an error (The "Welcome: Mercury Tours" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object).so how can i overcome that error

6 Answers  


I want to open a text file and then search some specified text in it and then replace that text with some other text i found that text in .txt but do not know how to replace that text can any body help me. if possible put the code for qtp

2 Answers  


In an(AUT) web application their are two frames as fraMain and fraFooter. Both the frames contain link which needs to be retrieved at a single step. I tried it using "Regular Expression" as fra.* but QTP doesn't recognize the object. So Plz help me out to get resolve the problem:-)

1 Answers  


Write the vb script for the lowest and highest values of an array?

1 Answers   Manhattan,


Categories