Does D need a sscanf?

Sean Kelly sean at f4.ca
Mon Apr 30 08:13:04 PDT 2007


Anders F Björklund wrote:
> Daniel Keep wrote:
> 
>>> I called mine "unformat", to match "format". Like writef / readf.
>>
>> Mine's called parsef (although it should probably be just parse to match
>> format), with a convenience function readfln (to match writefln, 
>> naturally.)
> 
> Not sure if it was mentioned in the post, but the crappy old code
> should still be posted at http://www.algonet.se/~afb/d/stdio/

And the original is at:

http://www.invisibleduck.org/~sean/code/unformat.d
http://www.invisibleduck.org/~sean/code/stdio.d
http://www.invisibleduck.org/~sean/code/utf.d

The utf changes are needed to support the one char unget limit.  It's 
also a bit more efficient.  Internally, everything is converted to dchar 
for comparison.  This is arguably not a good idea for performance 
reasons, but it simplified the implementation.


Sean



More information about the Digitalmars-d mailing list