conver BigInt to string

BBasile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 5 08:41:37 PST 2015


On Thursday, 5 November 2015 at 16:39:03 UTC, Namal wrote:
> On Thursday, 5 November 2015 at 16:35:01 UTC, BBasile wrote:
>> On Thursday, 5 November 2015 at 16:29:30 UTC, Namal wrote:
>>> Hello I am trying to convert BigInt to string like that while 
>>> trying to sort it:
>>>
>>> string s1 = to!string(a).dup.sort;
>>>
>>> and get an error
>>>
>>> cannot implicitly convert expression 
>>> (_adSortChar(dup(to(a)))) of type char[] to string
>>>
>>> what do I do wrong?
>>
>> try
>>
>> ".idup"
>>
>> otherwise
>>
>> "auto s1 = "
>
> auto did it, but idup leads to
>
> Error: can only sort a mutable array

sorry, I feel embarrassed now...good luck i wish you.


More information about the Digitalmars-d-learn mailing list