Conversion (silly question, sorry)

Derek Parnell derek at psych.ward
Tue Jan 1 16:32:27 PST 2008


On Tue, 01 Jan 2008 18:32:32 -0500, renoir wrote:

> Sorry for the silly question:
> how can i convert from string to int? And viceversa from int to string?
> Thx.

Have a look at the std.conv module.

   string s;
   double f;

   s = std.conv.to!(string)(23.45);
   f = std.conv.to!(double)(s);

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell


More information about the Digitalmars-d-learn mailing list