I have a string in the following format:
0: name: password: email: etc
I need to separate it in each ':', and I'm doing this with the strtok function (string, ':').
The problem is that the password can be null, and the default looks like this:
0: name :: email: etc
And then the strtok does not work anymore, because it does not only take the first ':', but both.
Is there any way to get around this by using strtok, or even make this process smarter?
Thank you.