Could find a similar thing for C here.
I need to break a sentence into a an char array based on occurrence of a character example: %
Example
If my sentance is my%healthy%dog then i should be able to get my, healthy and dog separately.
This could be in a loop as well.
tx
strtokis the standard C function to achieve string tokenizing.Also note that
strtokuses static variables internally, so it is not threadsafe. For threadsafety, you’ll have to use thestrtok_rfunction.