Why string alias is invariant ?

Sean Kelly sean at f4.ca
Thu Jan 31 11:02:22 PST 2008


Janice Caron wrote:
> On 1/31/08, Sean Kelly <sean at f4.ca> wrote:
>> And to do so the contents of data must be duplicated,
> 
> The problem there is the idup. Replace it with
> 
>      foreach( line; lines )
>      {
>          writefln( tolower( assumeUnique(line)) );
>      }
> 
> and the duplication goes away.

It does?  I didn't think tolower would modify a string in place.


Sean



More information about the Digitalmars-d mailing list