Difference between revisions of "LastPosEx"

From SCAR Divi Manual
Jump to: navigation, search
(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...")
 
Line 8: Line 8:
  
 
==Description==
 
==Description==
Returns the position of the last occurrence of a [[AnyString|string]] '''SubStr''' in another string '''S''' starting from the position given by '''Offset'''.
+
Returns the position of the last occurrence of a [[AnsiString|string]] '''SubStr''' in another string '''S''' starting from the position given by '''Offset'''.
  
 
==Example==
 
==Example==

Revision as of 08:36, 2 July 2011

Definition

function LastPos(const SubStr, S: AnsiString): 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