InStrArr

From SCAR Divi Manual
Jump to: navigation, search

Definition

function InStrArr(Str: AnsiString; Arr: TStringArray; CaseSensitive: Boolean): Boolean;

Availability

SCAR Divi 3.00 > Current

Description

Returns true if a string Str can be found in a TStringArray Arr. If CaseSensitive is false it will match the strings without taking case-sensitivity into regards.

Example

begin
  WriteLn(InStrArr('Hello', ['Hi', 'Hello', 'World'], True));
  WriteLn(InStrArr('Hello', ['hi', 'hello', 'world'], True));
  WriteLn(InStrArr('Hello', ['hi', 'hello', 'world'], False));
end.

Output:

1
0
1