xxxxxxxxxx
import std.stdio;
/** */
wstring fromWChar( const wchar* s )
{
import std.conv : to;
return s[ 0 .. wcslen( s ) ].to!wstring;
}
size_t wcslen( const( wchar )* s )
{
auto ptr = s;
for ( ; *ptr != 0; ptr += 1 ) {}
return ptr - s;
}
void sayHello( const( wchar ) *s )
{
auto s2 = fromWChar( s );
writeln( s2 );
}
void main() {
const( wchar )* s2 = "hello!";
sayHello( s2 );
}