In fact I used the fnction strtok_r, but it didn't work.
You want to be using strtok(), not the thread-safe version.
"It didn't work" means that you wrote your code wrong. Since you didn't share that code, we can only guess at the problem. I'm going to guess 57.