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

Finds the index of a search string using a specified starting position.

File
function RPos(
    const ASub: String; 
    const AIn: String; 
    AStart: Integer = -1
): Integer;
Parameters 
Description 
ASub 
The substring to locate.
 
AIn 
The value to be searched.
 
AStart 
The starting position. Default value is -1. 

Integer - Index position of the search string in the string value.

RPos is an Integer function used to locate the token specified by ASub in the string value specified by AIn using the starting position specified by AStart. 

When AStart is greater than 0, the starting position is the character at the index AStart from the beginning of the string AIn. When AStart is less than 0, the starting position is the character at the index AStart from the end of the string AIn. 

The return value of RPos is 0 when the search string in ASub does not occur in the string AIn.

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