InStrArr

From SCAR Divi Manual
Revision as of 23:03, 1 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function InStrArr(Str: AnsiString; Arr: TStringArray; CaseSensitive: Boolean): Boolean; </source> ==Availability== SCAR Divi 3....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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