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中判断tcp端口是否被占用

Delphi中的memo顶部添加行

Delphi 字符串转换ascii码10进制

Delphi 创建快捷方式的单元文件

Delphi idhttp超时重定向

Delphi 从网址链接中提取域名

Delphi服务程序(service)的调试方法

Delphi xe6 firemonkey移动应用程序的twebbrowser html页面上运行javascript

Delphi 自定义产生随机字符串函数

Delphi idftp

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



打赏

取消

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

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

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

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

评论

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