System.AnsiStrings.ElementToCharIndex
Delphi
function ElementToCharIndex(const S: AnsiString; Index: Integer): Integer;
C++
extern DELPHI_PACKAGE int __fastcall ElementToCharIndex(const System::AnsiString S, int Index)/* overload */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.AnsiStrings.pas System.AnsiStrings.hpp |
System.AnsiStrings | System.AnsiStrings |
Description
Renvoie la position du caractère contenant un élément spécifié dans une chaîne.
Appelez ElementToCharIndex pour déterminer quel caractère contient un élément particulier dans une chaîne, où 1 spécifie le premier élément, 2 le second, et ainsi de suite. Si le paramètre Index spécifie un élément non présent dans la chaîne (Index < 0 ou Index > Length(S)), ElementToCharIndex renvoie 0.