System.SysUtils.ElementToCharIndex

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

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 */;

プロパティ

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

説明

警告: ElementToCharIndex の ANSI バージョンは廃止予定です。AnsiStrings ユニットを使用してください。

文字列内の指定した要素を含む文字の位置を返します。

文字列内の特定の要素を含む文字を判別するには、ElementToCharIndex を呼び出します。その際、1 は最初の要素、2 は 2 番目の要素というように指定します。Index パラメータがその文字列の範囲内にない要素を指定している場合は(Index < 0 または Index > Length(S))、ElementToCharIndex は 0 を返します。

関連項目