function PosEx(const SubStr: string; const S: Substring; const Offset: Integer = 1): Integer; overload; inline;
The 1-based position of SubStr in S at or after Offset, 0 if none.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SubStr | string | |
| 2 | S | Substring | |
| 3 | Offset | Integer |
Returns: Integer
Remarks:
SubStr takes every text kind.
Examples
Searching from an offset.
uses Substr;
procedure Example;
begin
Assert(PosEx('b', Substring('abcb')) = 2);
Assert(PosEx('b', Substring('abcb'), 3) = 4);
end;