Original Post
In Perl there is a function that will split a string according to a given character. For example, I want to split the string "this is a test" into an array where:
args[0] is "this"
args[1] is "is"
args[2] is "a"
args[3] is "test"
So I might do:
int split(char * string, char * args[], char ch);
and call it like:
char input[1024];
char * args[256];
input = GetInput();
int nargs = split(input, args, '' '');
I''m not very good with arrays of null terminated strings. Can anyone help me out?
Thanks,
Russell