Topic Path: Symbol Reference > Functions > PosIdx Function
ContentsIndexHome
PreviousUpNext
PosIdx Function

Locates the position of a string within another string.

File
function PosIdx(
    const ASubStr: AnsiString; 
    const AStr: AnsiString; 
    AStartPos: Cardinal = 0
): Cardinal;
Parameters 
Description 
ASubStr 
ANSI string values to be located.
 
AStr 
ANSI string values to be searched.
 
AStartPos 
Initial position to be compared. Default value is 0. 

Cardinal - Position where substring is located, or 0 when not found.

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.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.