How do you tokenize strings in VB. I'm used to doing it in Java.
Sample of my string to tokenize....
"53233, 38948, 43223, 23449"
I need pull these numbers out individually.
Printable View
How do you tokenize strings in VB. I'm used to doing it in Java.
Sample of my string to tokenize....
"53233, 38948, 43223, 23449"
I need pull these numbers out individually.
A basic code :Quote:
Originally posted by pokermagic
How do you tokenize strings in VB. I'm used to doing it in Java.
Sample of my string to tokenize....
"53233, 38948, 43223, 23449"
I need pull these numbers out individually.
VB Code:
Dim str As String = "53233,38948,43223,23449" For Each c As Char In str.ToCharArray MessageBox.Show(c.ToString) Next
like this? if not, sorry...VB Code:
Module Module1 Sub Main() Dim s As String = "1234, 5678, 9101" Dim ss As String() = Split(s, ", ") Dim sss As String For Each sss In ss Console.WriteLine(sss) Next End Sub End Module