FROM : Norman Gray
DATE : Thu Apr 05 19:23:02 2007
János, hello.
On 2007 Apr 5 , at 18.10, János wrote:
> I am trying to parse a string with the C library string function
> strtok. The string can have the value from:
>
> " -t any -j 1 -q 17"
It looks as if you're actually trying to parse a command line with
options. If that's so, then you'd probably be best off looking at
getopt(3), which will do all the fiddly bits for you.
Norman
--
------------------------------------------------------------------
Norman Gray : http://nxg.me.uk
eurovotech.org : University of Leicester, UK
DATE : Thu Apr 05 19:23:02 2007
János, hello.
On 2007 Apr 5 , at 18.10, János wrote:
> I am trying to parse a string with the C library string function
> strtok. The string can have the value from:
>
> " -t any -j 1 -q 17"
It looks as if you're actually trying to parse a command line with
options. If that's so, then you'd probably be best off looking at
getopt(3), which will do all the fiddly bits for you.
Norman
--
------------------------------------------------------------------
Norman Gray : http://nxg.me.uk
eurovotech.org : University of Leicester, UK
| Related mails | Author | Date |
|---|---|---|
| János | Apr 5, 19:10 | |
| Norman Gray | Apr 5, 19:23 | |
| Peter Ilberg | Apr 5, 20:03 | |
| János | Apr 5, 20:49 | |
| Andy Armstrong | Apr 5, 20:57 | |
| Uli Kusterer | Apr 6, 12:26 | |
| Koryn Grant | Apr 11, 08:35 | |
| Uli Kusterer | Apr 11, 11:27 | |
| George Warner | Apr 11, 18:10 | |
| Graham J Lee | Apr 11, 18:40 | |
| János | Apr 11, 18:57 | |
| Koryn Grant | Apr 11, 21:36 |






Cocoa mail archive

