德尔福 - 波什()与边界 [英] Delphi - Pos() with boundaries

查看:120
本文介绍了德尔福 - 波什()与边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有一个名次()适于使用的源字符串中指定的边界,而不是让它执行整个数据搜索。 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆