System.SysUtils.TStringHelper.LastIndexOfAny
Delphi
function LastIndexOfAny(const AnyOf: array of Char): Integer; overload;
function LastIndexOfAny(const AnyOf: array of Char; StartIndex: Integer): Integer; overload;
function LastIndexOfAny(const AnyOf: array of Char; 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 tout caractère du tableau de caractères AnyOf
, dans la chaîne de base zéro en cours.
var
MyString: String;
begin
MyString := 'This is a string.';
Writeln(MyString.LastIndexOfAny(['T'], 0));
end.
Il existe trois méthodes LastIndexOfAny surchargées. Chacune vous permet de spécifier diverses options pour obtenir le dernier index des caractères donnés dans cette chaîne de base zéro.