这个函数怎么用?(带TReplaceFlags的)急!

neweb 2001-11-10 12:13:52
function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string;

一直不会用这个函数,因为不知道TReplaceFlags长得什么样子,望各位大虾能给个例子,比如:
Content := StringReplace(Content,chr(13),'<br>',(True, True));

报error:')' expected but ',' found

今天急着要用了,帮忙呵。
...全文
270 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
neweb 2001-11-10
  • 打赏
  • 举报
回复
解决了,谢谢!
没想到是用的 “[]” 括号
taxi 2001-11-10
  • 打赏
  • 举报
回复
rtReplaceAll是替换全部,rfIngoreCase是忽略大小写。看一看帮助就知道了。
taxi 2001-11-10
  • 打赏
  • 举报
回复
Content := StringReplace(Content,char(13), '<br>", [rfReplaceAll, rfIgnoreCase]);

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧