Results 1 to 3 of 3

Thread: [Resolved] XORing arrays of strings

  1. #1

    Thread Starter
    Fanatic Member Kzin's Avatar
    Join Date
    Dec 2000
    Posts
    611

    [Resolved] XORing arrays of strings

    I've got to lists of data in ASCII format. I want to generate a third list which contains all the vaules that are unique to the second list but not the first. Anyone got a really simple solution (Excel will do )
    Last edited by Kzin; Jan 14th, 2002 at 12:36 PM.
    Looking for a friendly intelligent chat forum? Visit the white-hart.net

  2. #2
    Megatron
    Guest
    Try this.
    VB Code:
    1. Function XORString(ByVal str1 As String, ByVal str2 As String) As String
    2.     For i = 1 To Len(str2)
    3.         If Not (str1 Like "*" & Mid$(str2, i, 1) & "*") Then XORString = XORString & Mid$(str2, i, 1)
    4.     Next i
    5. End Function
    6.  
    7. Private Sub Command1_Click()
    8.  
    9.     'Usage
    10.     Print XORString("String2", "StrXing1")
    11.    
    12. End Sub

  3. #3

    Thread Starter
    Fanatic Member Kzin's Avatar
    Join Date
    Dec 2000
    Posts
    611
    Thanks!
    Looking for a friendly intelligent chat forum? Visit the white-hart.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width