Does D need a sscanf?

Johan Granberg lijat.meREM at OVEgmail.com
Mon Apr 30 06:13:41 PDT 2007


Daniel Keep wrote:

> 
> 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
> 

I think it would be useful, the few time I have used sscanf it has really
saved me a lot of work.



More information about the Digitalmars-d mailing list