System.SysUtils.TStringHelper.LastIndexOf

De RAD Studio API Documentation
Aller à : navigation, rechercher

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;

Propriétés

Type Visibilité  Source Unité  Parent
function public System.SysUtils.pas System.SysUtils TStringHelper


Description

Renvoie le dernier index de la chaîne Value dans la chaîne de base zéro en cours.

StartIndex spécifie le décalage dans cette chaîne de base zéro où la méthode LastIndexOf commence la recherche, et Count spécifie le décalage de fin où la recherche se termine.

Il existe six méthodes surchargées LastIndexOf, chacune vous permettant de spécifier diverses options afin d'obtenir le dernier index de la chaîne donnée dans cette chaîne de base zéro.

Quand l'argument Value (Char ou String), transmis à LastIndexOf, n'est pas trouvé dans la chaîne de base zéro, la fonction LastIndexOf renvoie -1.

Voir aussi