On 2010-06-08 04:15:50 -0400, Ruslan Nikolaev <nruslan_de...@yahoo.com> said:

No. From the very beginning I said "it would also be nice to have some builtin function for conversion to dchar". That means it would be nice to have function that converts from tchar (regardless of its width) to UTF-32. The reason was always clear - you normally don't need UTF-32 chars/strings but for some character analysis you might need them.

Is this what you want?

        version (utf16)
                alias wchar tchar;
        else
                alias char tchar;

        alias immutable(tchar)[] tstring;

        import std.utf;

        unittest {
                tstring tstr = "hello";
                dstring dstr = toUTF32(tstr);
        }


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to