delphi 两字符串之间添加分隔符


本文整理自网络,侵删。

 
function AddStr(const Str: string; const AdditionalStr: string; const DelimiterStr: string): string;
begin
  if Str = EmptyStr then
  begin
    Result := AdditionalStr;
  end
  else
  begin
    Result := Str + DelimiterStr + AdditionalStr;
  end;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Text:=AddStr('123----456----789','8888','----');
//原始数据:
//123----456----789
//处理后
//123----456----789----8888
end;

相关阅读 >>

Delphi playsound()函数应用

Delphi fdconnection自动重连

在一个exe文件中查找指定内容,找到则返回起始位置,否则返回0

Delphi dos编程

Delphi 判断iso文件,iso文件头, iso filehead

Delphi 获取internet缓存文件

Delphi tdictionary 简单用法

Delphi简单加密解密

Delphi 调试ios时出现 please specify exact device preset uuid

Delphi线程的创建、挂起、激活与终止

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



打赏

取消

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

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

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

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

评论

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