Indy 9
|
function PosInStrArray(const SearchStr: string; Contents: array of string; const CaseSensitive: Boolean = True): Integer;
The lower and upper limits of the array Contents is determined using the Low and High functions.
When CaseSensitive is True, the values in SearchStr and the current array element must be an exact match. When CaseSensitive is False, the function AnsiSameText is used to compare SearchStr to the string in the current array position.
The return value for the PosInStrArray function will be -1 if the search string does not exist in Contents.