本文整理自网络,侵删。
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 sysutils.isdelimiter - 判断字符串的某个位置是不是指定的字符串
Delphi用多媒体库 bass.dll 播放 mp3 - 打开、播放、暂停、停止
Delphi firedac 下的 sqlite [10] - 使用 r-tree 搜索
更多相关阅读请进入《Delphi》频道 >>