System.SysUtils.TStringHelper.LastIndexOf

提供: RAD Studio API Documentation
移動先: 案内検索

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;

プロパティ

種類 可視性 ソース ユニット
function public System.SysUtils.pas System.SysUtils TStringHelper


説明

現在の 0 基準の文字列で、Value 文字列の最後のインデックスを返します。

StartIndex は、LastIndexOf メソッドが検索を開始する、この 0 基準の文字列におけるオフセットを示し、Count は、検索が終了する終わりのオフセットを示します。

LastIndexOf オーバーロード メソッドは 6つあり、それぞれ、この 0 基準の文字列において指定された文字列の最後のインデックスを取得するため、さまざまなオプションを指定することができます。

LastIndexOf に渡された Value 引数(Char または String)が 0 基準の文字列で見つからなかった場合、LastIndexOf 関数は -1 を返します。

関連項目