Saturday, 21 March 2015


'Remove Repetative Char in a string where String has only two type of input e.g. 01010101010100000011111101011111 
'Find the number of time Repetative Char would come 

str = "01010101010100000011111101011111"
Count=0
For i = 1 to len(str)

a=mid(str,i,1)
b=mid(str,i+1,1)

If not(a=b) Then
temp=temp&a
else
Count=Count+1
End If

Next

msgbox temp
msgbox "Number Of Deletion Happen" &"="&Count

No comments:

Post a Comment