LeonLanford
Active member
- Joined
- Dec 2, 2008
- Messages
- 28
- Programming Experience
- Beginner
I'm really confused.. 2 hours working with this and still cannot solve it
I have this code
I want to split "line" to array of "kalimat"
the string example is "uplot/leon.kacau.ayam.ass||1k||07-Dec-2008_02:25"
I tested by putting these
kalimat(0) shows "uplot/leon.kacau.ayam.ass"
kalimat(1) shows ""
kalimat(2) shows "1k"
kalimat(3) shows ""
kalimat(4) shows "07-Dec-2008_02:25"
--
What I want to ask is why there's gap between them? 1 and 3 empty.. I'm having problem with big string if there's gap like that.. How I can delete the gap?
Thanks..
I have this code
VB.NET:
Using WC As New System.Net.WebClient()
Dim strem As IO.Stream = WC.OpenRead(alamat_view)
Using reader As New System.IO.StreamReader(strem)
Dim line As String = String.Empty
baris = 0
While reader.Peek >= 0
line = reader.ReadLine()
Dim kalimat() As String = line.Split("||")
dgv_view.Rows.Add()
dgv_view.Item(0, baris).Value = baris + 1
'dgv_view.Item(1, baris).Value = Path.GetFileName(line)
dgv_view.Item(2, baris).Value = host & line
baris += 1
End While
End Using
End Using
I want to split "line" to array of "kalimat"
the string example is "uplot/leon.kacau.ayam.ass||1k||07-Dec-2008_02:25"
I tested by putting these
VB.NET:
MessageBox.Show(kalimat(0))
MessageBox.Show(kalimat(1))
MessageBox.Show(kalimat(2))
MessageBox.Show(kalimat(3))
MessageBox.Show(kalimat(4))
kalimat(0) shows "uplot/leon.kacau.ayam.ass"
kalimat(1) shows ""
kalimat(2) shows "1k"
kalimat(3) shows ""
kalimat(4) shows "07-Dec-2008_02:25"
--
What I want to ask is why there's gap between them? 1 and 3 empty.. I'm having problem with big string if there's gap like that.. How I can delete the gap?
Thanks..