StringReplace替代方案来提高性能 [英] StringReplace alternatives to improve performance
本文介绍了StringReplace替代方案来提高性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用StringReplace,以生成的XML替换& gt和< char本身,如下所示:
I am using StringReplace to replace > and < by the char itself in a generated XML like this:
StringReplace(xml.Text,'>','>',[rfReplaceAll]) ;
StringReplace(xml.Text,'<','<',[rfReplaceAll]) ;
事情是需要太长的时间来替换每一次& gt。
The thing is it takes way tooo long to replace every occurence of >.
你有什么更好的想法让它更快吗?
Do you purpose any better idea to make it faster?
推荐答案
尝试 FastStrings.pas 。
这篇关于StringReplace替代方案来提高性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文