| |
| Posted by Cassio Butrico | PermalinkReply |
|
Cassio Butrico
| Anyone help me?
I am using the version for the windows dmd v 2.066
to last I believe.
tried to use wstring in my terminal and see what happened.
wstring name;
write("wstring - write a name: ");
//readf("%s\n", &name);
name = cast(wstring)chomp(readln());
//name = to!wstring(chomp(readln()));// with accent runtime error utf
writeln("name length - ",name.length," - ",name);
string namec = cast(string)name;//
// string namec = to!string(name);
writeln("namec length - ",namec.length," - ", namec);
writeln("you write: ",namec," ok.");
wstring - write a name: cassio
name length - 3 - µàúþì│µ¢®
namec length - 6 - cassio
you write: cassio ok.
or this
wstring name;
write("wstring - write a name: ");
readf("%s\n", &name);
//name = cast(wstring)chomp(readln());
//name = to!wstring(chomp(readln()));// with accent runtime error utf
writeln("name length - ",name.length," - ",name);
string namec = cast(string)name;//
// string namec = to!string(name);
writeln("namec length - ",namec.length," - ", namec);
writeln("you write: ",namec," ok.");
wstring - write a name: cassio
name length - 6 - cassio
namec length - 12 - c a s s i o
you write: c a s s i o ok.
tried to use wstring in my terminal and see what happened.
very strange do not you think?
I tried several times changing conversions to cast. to! ...
question what I'm doing wrong?
sorry English is not my official language.
aguem pode me ajudar?
estou usando a versão para win do dmd v 2.066 a ultima creio eu.
tentei usar wstring no meu terminal e veja o que aconteceu.
muito estranho não acha?
tentei varias vezes mudando as conversões de cast para . to! ...
pergunta o que estou fazendo de errado?
desculpe-me ingles não e minha lingua oficial.
|