作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试在 delphi 2007 的程序中使用此代码
function ExtractText(const Str: string; const Delim1, Delim2: string): string;
var
pos1, pos2: integer;
begin
result := '';
pos1 := Pos(Delim1, Str);
if pos1 > 0 then begin
pos2 := PosEx(Delim2, Str, pos1+1);
if pos2 > 0 then
result := Copy(Str, pos1 + 1, pos2 - pos1 - 1);
end;
end;
我在谷歌上进行了搜索,发现我需要“FastCode.Libraries-0.6.4.zip”,我下载了它,但不知道如何使用它来使上面的代码起作用。请帮忙!
最佳答案
PosEx 在 StrUtils
单元中定义。确保将其包含在您的uses子句中。
关于delphi - 未声明的标识符 : 'PosEx' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6654580/
我尝试在 delphi 2007 的程序中使用此代码 function ExtractText(const Str: string; const Delim1, Delim2: string): st
是否有像 PosEx 这样的 Delphi D2010 函数可以从字符串末尾开始查找字符串内的子字符串? 我正在删除对 FastStrings 库的所有调用,我使用的函数之一是 FastPosBack
我是一名优秀的程序员,十分优秀!