Hello, I am looking for guidance on how to Split up this large string, while also adding it to my listview.
*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST& %SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND# !THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$
At the moment, I am only able to add the first set into my listview.
I have a feeling I need a loop, as well as remove part of the string once it has been added to the listview, but I am quite new to VB and have tried and tried, though unsuccessful. :confused:
If you are someone who could help resolve this for me id be really greatfull for your help.
*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST& %SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND# !THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$
At the moment, I am only able to add the first set into my listview.
I have a feeling I need a loop, as well as remove part of the string once it has been added to the listview, but I am quite new to VB and have tried and tried, though unsuccessful. :confused:
If you are someone who could help resolve this for me id be really greatfull for your help.
Code:
Dim stringdata as string = "*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$*@FIRST&%SECOND#!THIRD$"
Dim id As Integer = stringdata.IndexOf("@")
Dim fd As String = stringdata.Substring(id + 1, stringdata.IndexOf("&", id + 1) - id - 1)
Dim id As Integer = stringdata.IndexOf("%")
Dim fd As String = stringdata.Substring(id + 1, stringdata.IndexOf("#", id + 1) - id - 1)
Dim id As Integer = stringdata.IndexOf("!")
Dim fd As String = stringdata.Substring(id + 1, stringdata.IndexOf("$", id + 1) - id - 1)
LVProc.Items.Add(New ListViewItem({fdsa, fdsb, fdsc}))