You could use AnsiIndexText(const AnsiString AText, const array of string AValues):integer or MatchStr(const AText: string; const AValues: array of string): Boolean;
Something like
Result := (AnsiIndexText('Hi',['Hello','Hi','Foo','Bar']) > -1);
or
Result := MatchStr('Hi', ['foo', 'Bar']);
AnsiIndexText returns the 0-offset
index of the first string it finds in
AValues that matches AText
case-insensitively. If the string
specified by AText does not have a
(possibly case-insensitive) match in
AValues, AnsiIndexText returns –1.
Comparisons are based on the current
system locale.
MatchStr determines if any of the
strings in the array AValues match the
string specified by AText using a case
sensitive comparison. It returns true
if at least one of the strings in the
array match, or false if none of the
strings match.
Note AnsiIndexText has case-insensitively and MatchStr is case sensitive so i guess it depends on your use