Another Small And Simple Function To Take Each Character of a string, and put it into an Array, This helps significantly when you need to sift through a string. This Function Uses The spush (String Push) Function, Also In Code Snippits.
Public Function str2Array(xString As String) As String() Dim tmpArray() As String Dim tmpchar As String ' /* For Each Character In The String */ For I = 1 To Len(xString) ' /* Retrieve The Character */ tmpchar = Mid(xString, I, 1) ' /* Push It Into The Temporary Array */ spush tmpArray, tmpchar Next I ' /* Return The Array To The Calling Procedure */ str2Array = tmpArray End Function
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.