gpt4 book ai didi

delphi - 未声明的标识符 : 'PosEx'

转载 作者:行者123 更新时间:2023-12-03 15:48:53 25 4
gpt4 key购买 nike

我尝试在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com