德尔福 - 波什()与边界 [英] Delphi - Pos() with boundaries
问题描述
我想有一个名次()适于使用的源字符串中指定的边界,而不是让它执行整个数据搜索。 F.e:NewPos(SUBSTR,SourceString,胶印,EndingOffset)
I'd like to have a Pos() adapted to be used specifying boundaries within the Source string, rather than have it perform the search in the entire data. F.e: NewPos(SubStr, SourceString, Offset, EndingOffset)
它应该是在最新的Delphi XE3当前的ASM快速code实现的变形例,因此,这将是比PurePascal实现更快(显然也快于利用简单的方位或PosEx)。此外,应该使用UNI code字符串工作。
It should be a modification of the current ASM FastCode implementation in the latest Delphi XE3, so that it will be faster than a PurePascal implementation (and obviously also faster than using a simple Pos or PosEx). Also, it should work with Unicode strings.
推荐答案
有一个看的 PosEx
在 StrUtils
单元。这看起来像你正在寻找...
Have a look at PosEx
in the StrUtils
unit. That looks like what you're looking for...
这篇关于德尔福 - 波什()与边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!