Absolute beginner

Piotr Szturmaj bncrbme at jadamspam.pl
Fri Jan 13 13:16:48 PST 2012


Jorge wrote:
> My first question si very silly:
>
> string str = readln()
>
> my input is for example 123
>
> how can i convert this to an integer?

import std.conv;

// then in code:

auto i = to!int(str);


More information about the Digitalmars-d-learn mailing list