Substr.IsDelimiter Method

function IsDelimiter(const Delimiters: string; const S: Substring; const Index: Integer): Boolean; overload; inline;

Whether the character at Index (1-based) is one of Delimiters.

#NameTypeDescription
1Delimitersstring
2SSubstring
3IndexIntegerstart index

Returns: Boolean

Remarks:

Delimiters takes every text kind. An Index outside the text raises ESubstringRangeError.

Examples

The second character is a comma.

uses Substr;

procedure Example;
begin
    Assert(IsDelimiter(',', Substring('a,b'), 2));
end;