System.AnsiStrings.PosEx

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PosEx(const SubStr, S: AnsiString; Offset: Integer = 1): Integer;

C++

extern DELPHI_PACKAGE int __fastcall PosEx(const System::AnsiString SubStr, const System::AnsiString S, int Offset = 0x1)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.AnsiStrings.pas
System.AnsiStrings.hpp
System.AnsiStrings System.AnsiStrings

Description

Returns index value of substring, starting at offset.

PosEx returns the index of SubStr in S, beginning the search at Offset. The index is 1-based.

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

See Also