Substr.LastDelimiter Method

function LastDelimiter(const Delimiters: string; const S: Substring): Integer; overload; inline;

The 1-based position of the last character that is one of Delimiters, 0 when there is none.

#NameTypeDescription
1Delimitersstring
2SSubstring

Returns: Integer

Remarks:

Delimiters takes every text kind.

Examples

The extension's dot.

uses Substr;

procedure Example;
begin
    Assert(LastDelimiter('\.', Substring('C:\dir\file.txt')) = 12);
end;