本文整理自网络,侵删。
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 tstreamreader tfile assignfile读取文本文件
Delphi searchrec.attr and fadirectory
Delphi 10.4中新增功能:新的vcl tedgebrowser组件
更多相关阅读请进入《Delphi》频道 >>