本文整理自网络,侵删。
SysUtils.StringReplace - 替换
举例:
--------------------------------------------------------------------------------
var
ss,s: string;
begin
ss := '2007-2008';
s := StringReplace(ss,'00','x',[rfReplaceAll]);
ShowMessage(s); //2x7-2x8
s := StringReplace(ss,'00','x',[rfIgnoreCase]);
ShowMessage(s); //2x7-2008
end;
相关阅读 >>
Delphi 如何在程序中动态设置墙纸(使用iactivedesktop接口)
Delphi getmimetypefromfile 获取文件mime类型
解决 Delphi 程序在不同操作系统中 shellexecute 调用 chrome.exe 偶尔无效的问题
更多相关阅读请进入《Delphi》频道 >>