* Add optional start index for Pos()

This commit is contained in:
michael 2018-04-12 18:29:11 +00:00
parent 8e325e7c49
commit edd010c1bc

View File

@ -243,6 +243,7 @@ function Copy(const S: string; Index, Size: Integer): String; assembler; overloa
function Copy(const S: string; Index: Integer): String; assembler; overload;
procedure Delete(var S: String; Index, Size: Integer); assembler; overload;
function Pos(const Search, InString: String): Integer; assembler; overload;
function Pos(const Search, InString: String; StartAt : Integer): Integer; assembler; overload;
procedure Insert(const Insertion: String; var Target: String; Index: Integer); overload;
function upcase(c : char) : char; assembler;
@ -364,6 +365,14 @@ asm
return InString.indexOf(Search)+1;
end;
function Pos(const Search, InString: String; StartAt : Integer): Integer; assembler; overload;
asm
return InString.indexOf(Search,StartAt-1)+1;
end;
procedure Insert(const Insertion: String; var Target: String; Index: Integer);
var
t: String;