RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.PosEx Function

Returns the index value of a substring.

Pascal
function PosEx(const SubStr: string; const S: string; Offset: Integer = 1): Integer; overload;
C++
int PosEx(const AnsiString SubStr, const AnsiString S, int Offset = 1);

PosEx returns the index of SubStr in S, beginning the search at Offset. If Offset is 1 (default), PosEx is equivalent to Pos

PosEx returns 0 if SubStr is not found, if Offset is greater than the length of S, or if Offset is less than 1. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!