|
-
Sep 2nd, 2010, 08:16 AM
#1
Thread Starter
Junior Member
Need help on String manipulation...
For i = 1 To Len(Text1.Text)
For j = 1 To Len(Text1.Text)
If Not j = i Then
If Mid(Text1.Text, j, 1) = Mid(Text1.Text, i, 1) Then
Label1.Caption = Mid(Text1.Text, 1, j - 1) & Mid(Text1.Text, j + 1, Len(Text1.Text))
End If
End If
Next
Next
=======
this code is meant to display only the repeated letters for example if i entered the string "awa" the output would be "wa" but my problem here is that if i entered "aabbcc" the output is "aabbc"... how would i eliminate the other letters?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|