[aclug-L] Re: C question
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
You could loop over it yourself and if you see a digit (isdigit
(ctype.h)), start saving it. If you see something that's not a
digit, save what you saw so far and start again.
You could use sscanf(%d %s) and check the return code; loop over
the remaining %s for future sscanf's.
you could use *shiver* strtok
you could use an ugly strchr('0') || strchr('1') | ...
you could use perl: @numbers = $string =~ /(\d+)/g;
wow wasn't that easy.
You could tell perl to compile that and hand that in ...
-jeff
--
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|