toString vs. toUtf8

Bill Baxter dnewsgroup at billbaxter.com
Mon Nov 19 22:05:46 PST 2007


Kris wrote:
> "Sean Kelly" <sean at f4.ca> wrote in message
> [snip]
>>> Don't know if that hurts your eyes less or not, but it seems more 
>>> consistent with Tango's existing naming convention to me than toWString, 
>>> etc.
>> Yeah I was thinking the same thing.  It's certainly easier for me to read 
>> than the other form.
> 
> 
> Bill: actually, toString, toStringW and toStringD are more consistent with 
> themselves, and with Tango convention. Even toString, toString16 and 
> toString32 are significantly more style-consistent than toWString and 
> toWstring 

How so?
toString returns a string.
toInt    returns an int.
toFloat  returns a float.
to???    returns a wstring.

Seems whatever goes in the ??? place should include the letters 
"w-s-t-r-i-n-g" in that order.



--bb



More information about the Digitalmars-d mailing list