http://d.puremagic.com/issues/show_bug.cgi?id=8384
Summary: Poor wchar/dchar* to string conversion support
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P3
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Vladimir Panteleev <[email protected]> 2012-07-13
05:23:29 PDT ---
import std.conv;
import std.string;
unittest
{
static void test(T)(T lp)
{
assert(format("%s", lp) == "Hello, world!");
assert(to!string(lp) == "Hello, world!");
}
test("Hello, world!" .ptr);
test("Hello, world!"w.ptr);
test("Hello, world!"d.ptr);
}
wchar* conversion is commonly needed for Windows programming, as UTF-16 is the
native encoding for Unicode Windows API functions.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------