|
-
Jun 8th, 2004, 01:56 PM
#1
Thread Starter
New Member
tokenize strings
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.
-
Jun 8th, 2004, 02:43 PM
#2
Sleep mode
Re: tokenize strings
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.
A basic code :
VB Code:
Dim str As String = "53233,38948,43223,23449"
For Each c As Char In str.ToCharArray
MessageBox.Show(c.ToString)
Next
-
Jun 8th, 2004, 08:27 PM
#3
Lively Member
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
like this? if not, sorry...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|