www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - sscanf replacement in D

reply "Igor" <idemura yandex.ru> writes:
Hi,
I came to D from the C++ world. What is sscanf replacement?
std.streams seems deprecated, std.stdio doesn't offer something
like readf for string. What should I use?
Jun 15 2014
next sibling parent "safety0ff" <safety0ff.dev gmail.com> writes:
On Monday, 16 June 2014 at 01:05:46 UTC, Igor wrote:
 Hi,
 I came to D from the C++ world. What is sscanf replacement?
 std.streams seems deprecated, std.stdio doesn't offer something
 like readf for string. What should I use?

std.format is one option: http://dlang.org/phobos/std_format.html#.formattedRead
Jun 15 2014
prev sibling parent "Igor" <idemura yandex.ru> writes:
On Monday, 16 June 2014 at 01:08:33 UTC, safety0ff wrote:
 On Monday, 16 June 2014 at 01:05:46 UTC, Igor wrote:
 Hi,
 I came to D from the C++ world. What is sscanf replacement?
 std.streams seems deprecated, std.stdio doesn't offer something
 like readf for string. What should I use?

std.format is one option: http://dlang.org/phobos/std_format.html#.formattedRead

Thanks, it's exactly I was looking for.
Jun 15 2014