Absolute beginner

Matej Nanut matejnanut at gmail.com
Sat Jan 14 12:35:45 PST 2012

I've never noticed std.conv.parse takes a radix argument, silly me.
And will take
a look at readf from std.stream, definitely.


On 14 January 2012 01:20, Justin Whear <justin at economicmodeling.com> wrote:
> On Fri, 13 Jan 2012 23:05:19 +0100, Matej Nanut wrote:
>> While we're at it: what's the best way to parse in a formatted manner?
>> For example, if I want to get 5 hexadecimal digits converted into an
>> uint? And I want to simultaneously advance the string?
>> "sscanf" seems fiddly and unsafe.
> Check out readf: http://d-programming-language.org/phobos/
> std_stream.html#readf
> You'll need to wrap the string in a Stream interface (MemoryStream?), but
> since you're looking for advance-on-read, you want stream semantics
> anyhow.
> Justin

More information about the Digitalmars-d-learn mailing list