[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

TStringHelper.IndexOfAnyUnquoted

Find the position (index) of any string or character in a list.

Declaration

Source position: syshelph.inc line 105

public function TStringHelper.IndexOfAnyUnquoted(

  const AnyOf: array of Char;

  StartQuote: Char;

  EndQuote: Char

):Integer; overload;

function TStringHelper.IndexOfAnyUnquoted(

  const AnyOf: array of Char;

  StartQuote: Char;

  EndQuote: Char;

  StartIndex: Integer

):Integer; overload;

function TStringHelper.IndexOfAnyUnquoted(

  const AnyOf: array of Char;

  StartQuote: Char;

  EndQuote: Char;

  StartIndex: Integer;

  ACount: Integer

):Integer; overload;

function TStringHelper.IndexOfAnyUnquoted(

  const AnyOf: array of string;

  StartQuote: Char;

  EndQuote: Char;

  StartIndex: Integer;

  out Matched: Integer

):Integer; overload;

Description

IndexOfAnyUnQuoted returns the zero-based index of the first matching element in an array of charaters or strings (AnyOf), but disregards any quoted parts in the string. A quoted part is determined by a starting StartQuote and end-quote character EndQuote.

if no match is found, -1 is returned.

The search can be refined by specifying a (zero-based) index StartIndex. When specified, the search will start at the given character. Not specifying this option is equivalent to specifying zero.

If ACount is given, at most ACount characters in the source string will be considered for the search. This count includes the starting character. Not specifying this argument is equivalent to specifying the amount of remaining characters.

If AMatch is specified, on succesful return it will contain the index of the element in the array that contains the found match.

See also

Pos

  

Search for substring in a string.

TStringHelper.IndexOf

  

Find the position (index) of a string or character

TStringHelper.IndexOfUnquoted

  

Index of string, skipping quoted parts.

TStringHelper.IndexOfAny

  

Find the position (index) of any string or character in a list.

TStringHelper.LastIndexOf

  

Find the last position (index) of a string or character

TStringHelper.LastIndexOfAny

  

Find the last position (index) of any string or character in a list.


Documentation generated on: Mar 17 2017