System.SysUtils.TStringHelper.LastIndexOf
Delphi
function LastIndexOf(Value: Char): Integer; overload;
function LastIndexOf(const Value: string): Integer; overload;
function LastIndexOf(Value: Char; StartIndex: Integer): Integer; overload;
function LastIndexOf(const Value: string; StartIndex: Integer): Integer; overload;
function LastIndexOf(Value: Char; StartIndex: Integer; Count: Integer): Integer; overload;
function LastIndexOf(const Value: string; StartIndex: Integer; Count: Integer): Integer; overload;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TStringHelper |
Description
Returns the last index of the Value
string in the current 0-based string.
StartIndex
specifies the offset in this 0-based string where the LastIndexOf method begins the search, and Count
specifies the end offset where the search ends.
There are six LastIndexOf overloaded methods, each one allowing you to specify various options in order to obtain the last index of the given string in this 0-based string.
When the Value
argument (Char
or String
), passed to LastIndexOf, is not found in the 0-based string, LastIndexOf function returns -1
.