AnsiPosIdx
Locates the position of a string within another string.
function AnsiPosIdx(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
AnsiPosIdx 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. AnsiPosIdx adjusts the position where ASubStr is located top account for Leading- and Trailing- byte type in multi-byte character sets.