The new, new phobos sneak preview

BCS ao at pathlink.com
Mon Apr 6 14:36:08 PDT 2009


Reply to Andrei,

> auto a = slurp!(int, double)("filename", "%s, %s");
> 
> Each line in the file looks like e.g. "1, 2.3". slurp returns an array
> of Tuple!(int, double) with the parsed content.
> 

It would be nice to have a version that would slurp into pre defined structs.

struct S{ int i; double d }

S[] a = slurp!(S)("filename", "%s, %s");





More information about the Digitalmars-d mailing list