|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Anybody know how to tokenize a string and...
and store it in an ArrayList?
|
|
#2
|
|||
|
|||
|
You either
A) use a foreach with stringname.Split('char') or B) store in an array like array[] = stringname.Split('char') then pass off each element to the arraylist, maybe in a for(x<array.Count) ArrayList[x] = array[x]; I think the syntax for foreach is: ArrayList a = new ArrayList(); String strtok = "String to tokenize"; foreach (String test = strtoke.Split(' ')) a.Add(test); Or something to that extent, that should get you in the right direction. Regards, John |
|
#3
|
|||
|
|||
|
Yeah that's it, thanks.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Anybody know how to tokenize a string and... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|