Sponsored Ad

Thursday, November 11, 2010

How to Find a character count in Given String using QTP

Do you want to find out the the number of characters in a given string. The below program will help you to find the exact char count in target string. This QTP Script first split the given string for the given char and the find out the length of array.

Dim TargetStr
Dim tmpArray 
TargetStr="Software Testing: Char Count" 
tmpArray=split(TargetStr,"t") 
msgbox "Count of t in string is:" & ubound(tmpArray) 

How to Find a character count in Given String using QTP

1 comments:

  1. errm, there are 4 't' in this string...
    sofTware TesTing: char counT

    ReplyDelete

Sponsored Ad

Development Updates

Tech Updates