1.String转化成PChar
var str: string; pStr:PChar; ... pStr := PChar(str); PChar := PChar(string);
2.PChar转String
var pStr:PChar; str:string; ... str := strPas(pStr); string := strPas(PChar);
1.String转化成PChar
var str: string; pStr:PChar; ... pStr := PChar(str); PChar := PChar(string);
2.PChar转String
var pStr:PChar; str:string; ... str := strPas(pStr); string := strPas(PChar);
转载于:https://www.cnblogs.com/blogpro/p/11339022.html