std.string will get the boot

Denis Koroskin 2korden at gmail.com
Sun Jan 31 06:13:39 PST 2010


On Sun, 31 Jan 2010 11:34:03 +0300, Simen kjaeraas  
<simen.kjaras at gmail.com> wrote:

> Lionello Lunesu <lio at lunesu.remove.com> wrote:
>
>> I miss typedef. I think this is exactly what typedef was intended
>> for. Perhaps we can reintroduce it as a 'short hand' for such a
>> struct?
>
> struct Typedef( T ) {
>    T payload;
>    alias payload this;
> }
>
> Usage:
>
> alias Typedef!( int ) myInt;
>
> Is this what you want?
>
>> By the way, ASCII is a subset of UTF-8 (that was the whole
>> point), so there's no reason why 'char[]' can't still be used for
>> ASCII strings, right?
>
> AS far as I have understood (I am no Unicode guru), in some locales  
> toUpper and toLower map ASCII chars to non-ASCII chars. So ASCII being a  
> strict subset of UTF-8 is not always true.
>

I only know one example (in turkish):

i < - > İ
ı < - > I

That's a big issue because toUpper/toLower needs a locale to provide  
correct result.



More information about the Digitalmars-d mailing list