Skiping whitespace

matovitch camille.brugel at laposte.net
Sun May 26 05:03:30 PDT 2013


Hello,

I am writting a simple parser for .obj file (mesh) and I would 
like to read 3 floats like this :

    1.1       2.2

3.3

So I tried file.readf("%*[ \n\t]%f%*[ \n\t]%f%*[ \n\t]%f",&x, &y, 
&z); who works with C function scanf but doesn't work here.

Is there a simple way to parse this text ?

It is said in std.format that "It's comparable to C99's 
vsprintf()". So it is useful for writting but it would have been 
great to have an other format to read which would support regexp.

Thanks.


More information about the Digitalmars-d mailing list