Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Wed May 25, 2011 2:20 am |
|
|
Basic programming.
Search for the location of the ',' (strchr).
Then would depend on what is after the '1', and the likely format of the number. If it is always just one digit, you can just subtract '0' from the ASCII value, to get the number. If it is longer, but the string already terminates after it, then an ASCII to numeric conversion, starting at this point (atoi). If however there is a line feed, then you either need to extract the characters, or put a '\0' in place of the line feed.
Best Wishes |
|