Difference between revisions of "LastPosEx"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function LastPos(const SubStr, S: AnsiString): Integer; </source> ==Availability== SCAR Divi 3.10 > Current ==Description== Re...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | function | + | function LastPosEx(const SubStr, Str: AnsiString; const Offset: Integer): Integer; |
</source> | </source> | ||
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
− | Returns the position of the last occurrence of a [[ | + | Returns the position of the last occurrence of a [[AnsiString|string]] '''SubStr''' in another string '''Str''' starting from the position given by '''Offset'''. |
==Example== | ==Example== |
Latest revision as of 02:51, 18 September 2011
Definition
function LastPosEx(const SubStr, Str: 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 Str starting from the position given by Offset.
Example
begin WriteLn(LastPosEx('a', 'alol abc', 5)); end.
Output:
1