Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undeclared identifier: 'PosEx'

Tags:

delphi

I tried to use this code in my program in 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;  

I did a search on google i've found that i need "FastCode.Libraries-0.6.4.zip" i download it but don't know how to use it to make the code above works. please help!

like image 879
beingbad Avatar asked Aug 23 '26 02:08

beingbad


1 Answers

PosEx is defined in the StrUtils unit. Make sure to include it in your uses clause.

like image 163
Mason Wheeler Avatar answered Aug 26 '26 17:08

Mason Wheeler