Does D need a sscanf?

Daniel Keep daniel.keep.lists at gmail.com
Mon Apr 30 04:35:24 PDT 2007


Howdy all.

For a current project, I've had to go and implement a D version of C's
venerable sscanf function.  Thanks to a combination of regular
expressions, templates and tuples, the sucker's type-safe and
arbitrarily extensible.

Anyway, it's good enough for what I need, but I was wondering if there's
any demand for it in the standard library.  I'm happy to work to bring
it up to scratch and public domain it if people want to see it in Phobos
(and if Walter wants it there, of course.)  Heaven knows I've wanted
this exact function from std.stdio myself a few times. :)

What do you think?

	-- Daniel

-- 
int getRandomNumber()
{
    return 4; // chosen by fair dice roll.
              // guaranteed to be random.
}

http://xkcd.com/

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list