I've got a string containing both ints and a string. How do I split it into two arrays, one for ints and one for the string? I also need to maintain the order because I'm writing a file parsing system that depends on reading in and correctly splitting these strings.
EDIT: Here's a sample input, and what I would like as output:
~Wolf 100 45 4 5
Wolf as a string in an array and the ints in their own separate array.
EDIT: A little more info:
I'm getting five variables from the user and writing them to a file. Then, I'm reading them back in again. I need to be able to identify the numbers by the name. Now that I think about it, actually, I'm not sure splitting the string is the best way to go. Is there a way to put both ints and strings in a single array? That way I can find the name, and know that the next four ints after it belong to it.