Difference between revisions of "LastPosEx"

From SCAR Divi Manual
Jump to: navigation, search
(Definition)
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
function LastPos(const SubStr, S: AnsiString): Integer;
+
function LastPosEx(const SubStr, S: AnsiString; const OffSet: Integer): Integer;
 
</source>
 
</source>
  

Revision as of 09:36, 2 July 2011

Definition

function LastPosEx(const SubStr, S: AnsiString; const OffSet: Integer): Integer;

Availability

SCAR Divi 3.10 > Current

Description

Returns the position of the last occurrence of a string SubStr in another string S starting from the position given by Offset.

Example

begin
  WriteLn(LastPosEx('a', 'alol abc', 5));
end.

Output:

1

See Also