FMX.Text.GetPrevLexemeBegin

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetPrevLexemeBegin(const AText: string; const AIndex: Integer): Integer;

C++

extern DELPHI_PACKAGE int __fastcall GetPrevLexemeBegin(const System::UnicodeString AText, const int AIndex);

Properties

Type Visibility Source Unit Parent
function public
FMX.Text.pas
FMX.Text.hpp
FMX.Text FMX.Text

Description

Returns the start index of the word situated before a specified index.

Text specifies the string in which to search.

Index specifies the position, within Text, where to stop searching.

Example:

 index:=GetPrevWordBegin('This is my string', 8)
 //result
 index=5
 //the first word before position 8, is starting at position 5 :'is'

See Also