Click to See Complete Forum and Search --> : String Manipulation


dafabe
July 18th, 2001, 05:13 AM
I have a variant, like the following example

cdnzc:\1.txtzc:\textfilesz

what i want to do is take the string and split it into 3 seprate strings using the z to signify the end of 1 string

can anyone tell me what code i need, or even come up with a better way of doing it, remembering that the strings will change length.



-DAVE

TH1
July 18th, 2001, 05:16 AM
if the delimiter is always the same you can use the split function to put the seperate string into an array

dafabe
July 18th, 2001, 05:22 AM
could you give me some more detail on this?

Please

thanx in advance

-DAVE

TH1
July 18th, 2001, 05:26 AM
[vbcode]
Dim StringArray() As String
Dim MyString As String
MyString = "cdnzc:\1.txtzc:\textfilesz"

StringArray = Split(MyString, "\")
MsgBox StringArray(0)
'etc etc
[/vcode]