std.conv - custom string to struct conversion ?
Dicebot
public at dicebot.lv
Fri Aug 2 07:02:16 PDT 2013
On Friday, 2 August 2013 at 09:59:12 UTC, monarch_dodra wrote:
> It wouldn't because "myFile.readf("Entry: %s %s", &s, &s);"
> wouldn't know *what* to pass to the constructor. AFAIK. I could
> be wrong.
It should. Pattern matching is not target-aware for readf
patterns. It will simply find a whitespace separators and pass
everything to the left to one constructor and everything to the
right to the second one (trimming extra whitespaces).
More information about the Digitalmars-d-learn
mailing list