You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Added Delphi 6 support thanks to andreluisfc
This commit is contained in:
@@ -817,6 +817,10 @@ function GetCommandLineSwitchValue(const aKey : string; var aValue : ustring) :
|
||||
/// </summary>
|
||||
function IsCEFSubprocess : boolean;
|
||||
|
||||
{$IFNDEF FPC}{$IFNDEF DELPHI7_UP}
|
||||
function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer;
|
||||
{$ENDIF}{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@@ -3443,4 +3447,20 @@ begin
|
||||
Result := GetCommandLineSwitchValue('type', TempValue) and (length(TempValue) > 0);
|
||||
end;
|
||||
|
||||
{$IFNDEF FPC}{$IFNDEF DELPHI7_UP}
|
||||
function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer;
|
||||
var
|
||||
TempString : string;
|
||||
begin
|
||||
if Offset <= 1 then
|
||||
Result := Pos(SubStr, S)
|
||||
else
|
||||
begin
|
||||
TempString := copy(S, Offset, length(S));
|
||||
Result := Pos(SubStr, TempString);
|
||||
if (Result > 0) then inc(Result, Offset - 1);
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}{$ENDIF}
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user