digitalmars.D - std.string.toString(wchar* s)
- Geoff Hickey (15/15) Mar 27 2006 Some time ago someone asked about including this function in Phobos:
 - =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= (3/4) Mar 28 2006 I asked for it ages ago and provided an implementation but didn't get
 
Some time ago someone asked about including this function in Phobos:
wchar[] toString(wchar* s)
{
	return s ? s[0 .. wcslen(s)] : cast(wchar[])null;
}
(For those who haven't visited string.d: there's a char version of this,
but no wchar).
I just ran into the need for this while writing some code to process
command lines in Windows programs. (There's a GetCommandLineArgvW in the
API, but no "A" version, even though there's a GetCommandLineA).
Well, it seems like this function is still needed in Phobos; maybe it
got forgotten before. (Ideally there should be a version that transcoded
from wchars to UTF-8, too, don'tcha think?)
- Geoff Hickey -
- Sporadic D Enthusiast -
 Mar 27 2006
Geoff Hickey wrote:Some time ago someone asked about including this function in Phobos:I asked for it ages ago and provided an implementation but didn't get approved. I support yours. The function it's still needed.
 Mar 28 2006








 
 
 
 =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?=