ViaThinkSoft CodeLib
This article is in:
CodeLib → Programming aids → Delphi
function IndexOf(array_to_search: array of string; search_for: string): integer;
var
i: integer;
begin
result := -1;
for i := 0 to length(array_to_search) - 1 do
begin
if array_to_search[i] = search_for then
begin
result := i;
break;
end;
end;
end;
Daniel Marschall
ViaThinkSoft Co-Founder
ViaThinkSoft Co-Founder