Split Functions

How do i do to use Split Functions for split binary file.

For example if i have a file with this text


GIF89a...andsnqrhht;GIF89a...swiqhdiwetywth;


He must create two file.

One file with this text


GIF89a...andsnqrhht;


and another file with this text


GIF89a...swiqhdiwetywth;


I want that the text delimitator isGIF89a.

I read that i can useSplit feature, but i don't know how to use it

[580 byte] By [flash.tato] at [2007-12-22]
# 1

Split is a method on the string class.

So I suppose you could read the data into a string and then split it.

This could be done by using My.Computer.Filesystem.ReadAllText method and then calling split method on the string

or

You could convert the byte array to a string using the .tostring method and then use the split method on this string.

But I'm not sure what other binary data is there and what may be lost as a result of any conversions due to encoding.

spotty at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Can you post a code sample?
flash.tato at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

Dim s As String = "GIF89a...andsnqrhht;GIF89a...swiqhdiwetywth"
Dim Items() As String
Items = s.Split(";")
For Each SpecificItem As String In Items
MsgBox(SpecificItem)
Next

spotty at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...