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)
errm, there are 4 't' in this string...
ReplyDeletesofTware TesTing: char counT