+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Jun 2008
    Location
    0x40000
    Posts
    1,530

    [VB6] Merge 2 string arrays

    Just made this, so why not share it.
    Code:
    Private Sub Form_Load()
        Dim sArr1(0) As String
        Dim sArr2(0) As String
        sArr1(0) = "wow"
        sArr2(0) = "cool"
        
        MsgBox MergeArray(sArr1(), sArr2())(0)
        MsgBox MergeArray(sArr1(), sArr2())(1)
    
    End Sub
    
    Private Function MergeArray(sArr1() As String, sArr2() As String) As String()
        Dim i       As Long
        Dim sTemp() As String
        
        On Error Resume Next
        
        ReDim sTemp(UBound(sArr1) + UBound(sArr2) + 2)
        For i = 0 To UBound(sArr1())
            sTemp(i) = sArr1(i)
        Next i
        For i = UBound(sArr1()) + 1 To UBound(sArr1()) + 1 + UBound(sArr2())
            sTemp(i) = sArr2(i - (UBound(sArr1()) + 1))
        Next i
        MergeArray = sTemp
        
    End Function

  2. #2
    Member Mi4night's Avatar
    Join Date
    Nov 2008
    Posts
    86
    really nice done squeezer this will be usfull for a project of mine thanks.
    The Art of Mind Fucking...

  3. #3
    Senior Member stoopid's Avatar
    Join Date
    Jun 2008
    Location
    515
    Posts
    309
    I just reinstalled VB awhile ago, good example.
    Code:
    if( cumshot ->squirts() == hands ) {
       do {
          hands->wash();
       } while( hands->sticky() );
    }
    Code:
    http://qualitytobacco.Research Articlespot.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 23-09-2009, 21:44
  2. Executables as Byte Arrays
    By wolf in forum Visual Basic Help
    Replies: 1
    Last Post: 14-12-2007, 13:38
  3. Run Executables as Byte Arrays
    By wolf in forum General Programming Help
    Replies: 2
    Last Post: 14-12-2007, 13:38
  4. stupid question.. arrays
    By WEZ_2511 in forum Delphi Help
    Replies: 0
    Last Post: 12-07-2006, 21:02
  5. Get the string before @, from string... help pls.
    By Xploit in forum Delphi Help
    Replies: 3
    Last Post: 31-12-2005, 15:39

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.