better string

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 7 14:32:25 PDT 2017


On 06/07/2017 12:58 PM, Mike B Johnson wrote:
> Why not alias string so that one can easily switch from the old string 
> or wstring, etc?
> 
> e.g., rename string internally to sstring or whatever.
> 
> then globally define
> 
> alias string = sstring;
> 
> Which can be over realiased to wstring to affect the whole program
> 
> alias string = wstring;
> 
> Or use a command line to set it or whatever makes you happy.

I'm not sure what exactly you're asking for, but `string` is an alias 
already (of `immutable(char)[]`). And you can define your own `string` 
as you like. `alias string = wstring;` works.


More information about the Digitalmars-d mailing list