Delphi 添加或解除引号


本文整理自网络,侵删。

 
添加或解除引号:
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('"'); // Delphi
end;

相关阅读 >>

Delphi 获取文件大小方法

Delphi2007-Delphi2010 程序不出现在任务栏的方法

Delphi示例代码 android,ios,osx,windows,linux,html5

Delphi xe10 针对全面屏手机端无法全面显示,下方显示黑条的处理

Delphi api实现抓屏

Delphi复制文件夹内所有文件

Delphi streamtohexstr

Delphi xe2 - 实现主窗口在任务栏上不显示

Delphi record,两种声明方式

Delphi opendialog设置默认打开路径

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...