Indy 9
RPos
Unit: IdGlobal
Finds the index of a search string using a specified starting position.
function RPos(const ASub: String; const AIn: String; AStart: Integer = -1): Integer;
Unit
IdGlobal
Parameters
const ASub: String
The substring to locate.
const AIn: String
The value to be searched.
AStart: Integer = -1
The starting position. Default value is -1.
Return Value
Integer - Index position of the search string in the string value.
Description
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.


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