PosIdx
Locates the position of a string within another string.
function PosIdx(const ASubStr: AnsiString; const AStr: AnsiString; AStartPos: Cardinal = 0): Cardinal;
Unit
Parameters
const ASubStr: AnsiString
ANSI string values to be located.
const AStr: AnsiString
ANSI string values to be searched.
AStartPos: Cardinal = 0
Return Value
Cardinal - Position where substring is located, or 0 when not found.
Description
PosIdx is a Cardinal function that returns the position of a string in another string using a given starting position. ASubStr is the ANSI string to be located in AStr starting with character found in position AStartPos.
Use AnsiPosIdx to perform substring searches where arguments contain values in Multi-byte character sets.