System.SysUtils.TStringHelper.LastIndexOf

From RAD Studio API Documentation
Jump to: navigation, search

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 string.

StartIndex specifies the offset in this string where the LastIndexOf method begins the search, and Count specifies the length of the searched substring.

There are six LastIndexOf overloaded methods, each allowing you to specify various options to obtain the last index of the given string in this string.

When the Value argument (Char or String), passed to LastIndexOf, is not found in the string, LastIndexOf function returns -1.

See Also