Conversion (silly question, sorry)

Bill Baxter dnewsgroup at billbaxter.com
Tue Jan 1 21:53:30 PST 2008


Jarrett Billingsley wrote:
> "renoir" <renato at rexlen.it> wrote in message 
> news:fleiig$28gg$1 at digitalmars.com...
>> Sorry for the silly question:
>> how can i convert from string to int? And viceversa from int to string?
>> Thx.
> 
> If you're using D1, use std.string.toString to convert most basic types to 
> strings and std.conv.toInt to convert from strings to ints. 

Or get std2 from dsource and use things like std2.conv.to!(double)(s).

http://www.dsource.org/projects/std2

--bb


More information about the Digitalmars-d-learn mailing list