toString vs. toUtf8
Sean Kelly
sean at f4.ca
Tue Nov 20 12:42:18 PST 2007
Christopher Wright wrote:
>
> class String {
> char[] opImplicitCast () {}
> wchar[] opImplicitCast () {}
> dchar[] opImplicitCast () {}
> }
>
> String toString () {}
>
> How does that look?
Tango already has a String class with toUtf8, toUtf16, and toUtf32
member functions. This was one of our original objections to the idea
of toString as a member function that must return a char[]. We will
have to rename the class to something else if this change goes through.
Sean
More information about the Digitalmars-d
mailing list