FMX.Text.GetLexemeBegin
Delphi
function GetLexemeBegin(const Text: string; Index: Integer): Integer;
C++
extern DELPHI_PACKAGE int __fastcall GetLexemeBegin(const System::UnicodeString Text, int Index);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | FMX.Text.pas FMX.Text.hpp |
FMX.Text | FMX.Text |
説明
指定されたインデックスが含まれている単語の開始インデックスを返します。
Text
は、検索範囲となる文字列を指定します。
Index
は、単語の識別に使用される、Text
内の位置を指定します。Index
の位置にある文字が単語の一部である場合、GetLexemeBegin はその単語の開始インデックスを返します。
Index
の位置にある文字が Text
内の単語に含まれていない場合、GetLexemeBegin は 0
を返します。
例:
index:=GetWordBegin('This is my string', 7)
//result
index=5
//the word starts at position 5:'is'