You reset it (by simple assignment) when str is not NULL and only then. if(str != NULL) //Checking to make sure our str has not made it to the null character
The comment is not correct. You pass NULL to strtok when you want to continue tokenizing the string.
Besides, why are you trying to implement an inherently broken function? A function with non-thread-local static variables is not thread-safe and therefore is not only fairly useless, but also dangerous to any unsuspecting users who might decide to use it.