Marco Trapanese <ma******************@gmail.comwrote:
I use strok_r function:
strtok_r isn't an ISO C function, but if it works sufficiently similarly
to strtok() (which is ISO), it won't be able to do what you want to do.
It works like a charm but strtok_r parses any char which is in the
delimiters string.
This is how strtok(), and presumably strtok_r() as well, is required to
work.
Instead I want the delimiter is actually the string itself.
There is no single ISO C function which will do that for you, but it's
easy enough to write one yourself, with the help of strstr() and some
pointer manipulation.
Richard