Indy 9 | Content | Index | Reference

PosIdx
See Also, Unit: IdGlobal
Locates the position of a string within another string.

    function PosIdx(const ASubStr: AnsiString; const AStr: AnsiString; AStartPos: Cardinal = 0): Cardinal;

Unit
IdGlobal
Parameters
const ASubStr: AnsiString
ANSI string values to be located.
const AStr: AnsiString
ANSI string values to be searched.
AStartPos: Cardinal = 0
Default value is 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.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.