I would have liked to use stringtok (especially if it provided a third delimiter argument), however the page references are no longer valid. http://www.compsoc.man.ac.uk/~cow/tmp/gcc/21_strings/stringtok_h.txt The following reference page should be updated: http://www.compsoc.man.ac.uk/~cow/tmp/gcc/21_strings/howto.html#3