Greetings to all of you fellow coders.
I have been doing some reads through all of the documentations but couldn't find anything that suits this...
I have a string like:
char *origin = "THIS, IS, SPARTA!"
What I want to do is get all characters in a string up to a certain delimiter, for that I've searched I can do that with:
But what I don't know and haven't found is how to use these functions but to start reading from a certain position in the string.
So I need to get the characters up to a comma but after "THIS," so that would be starting in position 5...
¿How could I do that?
I tried using [x] in brackets but then it would just read a character...
Yes, I know how to do that, what I don't know is how to to that begginning from a certain position in the string....
JLBorges is speaking in code. What's he's saying in English is, "Divide and conquer."
You're free to split the string anywhere you like and process it in the peices that you're interested in.
In the end I did this by doing this, more simpler:
usrnm = strtok (&string,":");
printf("you got: %s\n",example);