Convert strings with different format to float

Tom Kazimiers 2voodoo at gmx.de
Wed Sep 8 10:11:47 PDT 2010


On 09/08/2010 06:58 PM, Stanislav Blinov wrote:
>  08.09.2010 20:46, Tom Kazimiers wrote:
>> Great! I am looking forward to that release :-). Any idea when it will
>> be available?
>>
>> For the mean time I will, as proposed, make a separate function that
>> checks if there is a dot in it or not. Then I take to!float and to!int,
>> respectively.
>>
>> Cheers,
>> Tom
> That won't really help against this bug: to!float("0.") will also
> trigger assertion. You probably should just check if string contains
> single 0.
> 

Ah, thanks, I must have missed that!

Regards,
Tom


More information about the Digitalmars-d-learn mailing list