本文整理自网络,侵删。
添加或解除引号:function QuotedString: string;function QuotedString(const QuoteChar: Char): string;
function DeQuotedString: string;function DeQuotedString(const QuoteChar: Char): string;//--------------------------------------------------------------------------------var str1, str2: string;begin str1 := 'Delphi';
str2 := str1.QuotedString; // 'Delphi' str2 := str1.QuotedString('"'); // "Delphi"
str1 := '"Delphi"'; str2 := str1.DeQuotedString('"'); // Delphiend;
相关阅读 >>
Delphi 在firemonkey应用程序中使用torientationsensor获取设备倾斜和指南针航向
更多相关阅读请进入《Delphi》频道 >>