Hello,
How can i capture first letter of any string using QTP.
For ex.. i want "j" in the below string
"john"
could any one explain me?
Is there any function for that?

Answers were Sorted based on User's Feedback



Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / uday kumar_anem

str="john"
msgbox(left(str,1))

Is This Answer Correct ?    15 Yes 1 No

Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / neeraj chauhan

Dim str, str1
str="john"
str1=mid (str, 1,1)
msgbox str1

Is This Answer Correct ?    9 Yes 4 No

Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / veeranki naveen goud

var = Ltrim (" Veeranki Naveen ")
'Ltrim is used to remove the left padded spaces
var2 = mid (var,1,1)
msgbox var2

OR

var = Trim (" John")
va2 = left(var,1)
msgbox var2



Regards,
Veeranki Naveen,
Noida.

Is This Answer Correct ?    2 Yes 0 No

Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in th..

Answer / naveen

This is simple and easy one when compared to second
str="john"
msgbox(left(str,1))

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How good are you in writing VBscript code for your application? Can you completely write VBscrit for your project with out using recording mode in QTP?

3 Answers   CTS,


when will you do debug your script? and explain that process?

0 Answers   Covansys,


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

0 Answers  


Did you use flatfiles in your projects?At what situation you used it?How can you upload flatfiles?

1 Answers  


what type of run time errors you get while you ar edoing rpg program?

0 Answers  


How to handle run time errors?

9 Answers  


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

0 Answers  


what is the mail use of frame work(with detail). architecture for keyword driven frame work

0 Answers   Persistent,


How is test case write?

0 Answers  


How to connect to data base?

2 Answers  


what is the difference between link and hyperlink?

10 Answers   Infosys,


how many wayes we do the parameterization?

1 Answers  


Categories