Difference between revisions of "LastPos"
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...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
| − | function LastPos(const SubStr, | + | function LastPos(const SubStr, Str: AnsiString): Integer; |
</source> | </source> | ||
| Line 8: | Line 8: | ||
==Description== | ==Description== | ||
| − | Returns the position of the last occurrence of a [[AnyString|string]] '''SubStr''' in another string ''' | + | Returns the position of the last occurrence of a [[AnyString|string]] '''SubStr''' in another string '''Str'''. |
==Example== | ==Example== | ||
| Line 21: | Line 21: | ||
==See Also== | ==See Also== | ||
| − | *[[ | + | *[[LastPosEx]] |
*[[Pos]] | *[[Pos]] | ||
*[[Copy]] | *[[Copy]] | ||
Latest revision as of 02:50, 18 September 2011
Definition
function LastPos(const SubStr, Str: AnsiString): Integer;
Availability
SCAR Divi 3.10 > Current
Description
Returns the position of the last occurrence of a string SubStr in another string Str.
Example
begin
WriteLn(LastPos('a', 'alol abc'));
end.Output:
6