VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code like vb's own function called Split

by Muhamad Akber (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code like vb's own function called Split

Rate This code like vb's own function called Split



    
    Dim myArray(), ConcdStr As String
    Dim IntCounter, TextLen, ArrCounter As Integer
    
    TextLen = Len(Expression)
    
    For IntCounter = 1 To TextLen
        If Mid(Expression, IntCounter, 1) = Delimiter Then
            myArray(ArrCounter) = ConcdStr
            ConcdStr = ""
            IntCounter = IntCounter + 1
            ArrCounter = ArrCounter + 1
        End If
        ConcdStr = ConcdStr & Mid(Expression, IntCounter, 1)
        
        If Len(ConcdStr) <> 0 Then
            ReDim Preserve myArray(ArrCounter)
            myArray(ArrCounter) = ConcdStr
        End If
    Next
    
    MySplit = myArray
End Function

Download this snippet    Add to My Saved Code

This code like vb's own function called Split Comments

No comments have been posted about This code like vb's own function called Split. Why not be the first to post a comment about This code like vb's own function called Split.

Post your comment

Subject:
Message:
0/1000 characters