Skip navigation.
 
mlRe: C strtok question
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

Related mailsAuthorDate
mlC strtok question János Apr 5, 19:10
mlRe: C strtok question Norman Gray Apr 5, 19:23
mlRe: C strtok question Peter Ilberg Apr 5, 20:03
mlRe: C strtok question János Apr 5, 20:49
mlRe: C strtok question Andy Armstrong Apr 5, 20:57
mlRe: C strtok question Uli Kusterer Apr 6, 12:26
mlRe: C strtok question Koryn Grant Apr 11, 08:35
mlRe: C strtok question Uli Kusterer Apr 11, 11:27
mlRe: C strtok question George Warner Apr 11, 18:10
mlRe: C strtok question Graham J Lee Apr 11, 18:40
mlRe: C strtok question János Apr 11, 18:57
mlRe: C strtok question Koryn Grant Apr 11, 21:36