I have a string with values seperated by commas like this:
"value 1, value 2, value 3, value 4, value 5"
What I want to do is break this string into individual pieces using the comma as the delimiter. I have used strtok() in the past and it has worked great. However, I knew the maximum possible number of values that there would be in the string so I could just use a for loop with the maximum number of values to stop the loop. This new situation could have 1 - several hundred values. What approach/function would you recommend?