Read integer from multiple integers string

Hello,

I want to program an Ethernet client reading incoming strings from the client. The client is sending strings like this one :

Qs324=0;456;1000;234;0;456

I want to get, for example the 4th value (234) of this string to store it in a variable. I don't know what function to use, could you help me please ?

Method 1 : Read the whole input into a string (Note NOT a String) then use the strtok() function to extract the piece that you want, delimited by semi-colons, then use the the atio() function to turn it into an integer.

Method 2 :Read the bytes as they arrive, count the semi-colons so that you know where you are and save the bytes that you want in a char array terminated by a null to turn it into a string, then use the the atio() function to turn it into an integer.

Thank you. I'm a beginer and have no idea about how to do that but I'll have a look on internet.

Some of the code in the example here might be helpful.

And, by the way, @UKHeliBob made a small typo - the correct name of the function is atoi(). (Ascii to integer)

...R

UKHeliBob made a small typo

Good spot Robin.

Now, of course, using Google you can search for the atio() function and find my post !

Only Bob and I know that atio() is ASCII to Integer Octal.