Qtp Script to find the number of occurences of a char in a string-VB Script to find the number of occurences of a char in a string-QTP Scripts for beginners-VB Script


Qtp Script to find the number of occurences of a char in a string
 

str="hellllllllo all"

counter=0

For i=1 to len(str)

char=mid(str,i,1)

If char="l" Then

counter=counter+1

End If

Next

Msgbox counter

No comments:

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge