DELPHI 中pwidechar 与String

时间:2015-04-11 17:38:54   收藏:0   阅读:823
 1 var
 2 
 3  s,s1: string;    
 4 
 5 pw: PWideChar;    
 6 
 7 begin      
 8 
 9   s:=hello worldxxxx;     
10 
11   GetMem(pw,2*length(s)+2);    
12 
13   pw:=StringToWideChar(s,pw,length(s)+2);    
14 
15   s1:=WideCharToString(pw);    
16 
17   edit1.Text:=s1;
18 
19     freemem(pw);    
20 
21 end;

 

原文:http://www.cnblogs.com/moonwind/p/4417987.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!