System.SysUtils.ElementToCharIndex
Delphi
function ElementToCharIndex(const S: AnsiString; Index: Integer): Integer;
function ElementToCharIndex(const S: UnicodeString; Index: Integer): Integer;
C++
extern DELPHI_PACKAGE int __fastcall ElementToCharIndex _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const System::AnsiString S, int Index)/* overload */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Avertissement : La version ANSI de ElementToCharIndex est obsolète. Veuillez utiliser l’unité AnsiStrings.
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.