masj78
Active member
I am using the Split Function to make a String array of the contence of a text file(array of words). I am reading the file using StreamReader.
The problem occuring is that the first String object in the Array, which is the first word of the text file is missing its first letter.
Example contence of the file is:
This is a test!
The This word gets put into the first array position as his, and all the other words are complete with no letters missing.
My code is as follows:
Dim fileRead As New IO.StreamReader("C:\store.txt")
Dim store As Array
Do Until (fileRead.Read = -1)
strRead = fileRead.ReadToEnd
strRead.ToString()
store = Split(strRead, " ", -1)
Loop
reading out store(0) gives his
Any ideas anyone!
The problem occuring is that the first String object in the Array, which is the first word of the text file is missing its first letter.
Example contence of the file is:
This is a test!
The This word gets put into the first array position as his, and all the other words are complete with no letters missing.
My code is as follows:
Dim fileRead As New IO.StreamReader("C:\store.txt")
Dim store As Array
Do Until (fileRead.Read = -1)
strRead = fileRead.ReadToEnd
strRead.ToString()
store = Split(strRead, " ", -1)
Loop
reading out store(0) gives his
Any ideas anyone!