T
tad_wegner
I have multiple strings like the following...
"ITEM 1000 20 X4"
I want to split the string into an array. So I did the following...
tmp = split(line)
Now this is the array data...
tmp[0] = "ITEM"
tmp[1] = " "
tmp[2] = " "
tmp[3] = "100"
tmp[4] = " "
...and so on.
I want to get rid of the blank array points; tmp[1], tmp[2], tmp[4
such that the array will read like this...
tmp[0] = "ITEM"
tmp[1] = "100"
tmp[2] = "20"
...and so on.
Is there a way to split strings on "white space". I only ask becaus
the strings I will be digesting are of variable length. I can program
do-while-loop to count the number of blank entries and work around, bu
I figured there had to be an easier way to do that.
THANKS TONS
-Tod
"ITEM 1000 20 X4"
I want to split the string into an array. So I did the following...
tmp = split(line)
Now this is the array data...
tmp[0] = "ITEM"
tmp[1] = " "
tmp[2] = " "
tmp[3] = "100"
tmp[4] = " "
...and so on.
I want to get rid of the blank array points; tmp[1], tmp[2], tmp[4
such that the array will read like this...
tmp[0] = "ITEM"
tmp[1] = "100"
tmp[2] = "20"
...and so on.
Is there a way to split strings on "white space". I only ask becaus
the strings I will be digesting are of variable length. I can program
do-while-loop to count the number of blank entries and work around, bu
I figured there had to be an easier way to do that.
THANKS TONS
-Tod