Delphi PChar与String互转

1.String转化成PChar

例:

var

  str: string;

  pStr:PChar;

...

pStr := PChar(str);

 

2.PChar转String

例:

var

  pStr:PChar;

  str:string;

...

str := strPas(pStr);
posted @ 2014-12-26 09:53  绣春刀  阅读(2813)  评论(0编辑  收藏  举报