procedure THIArrayFind._work_doFind0;
var
i, idx: Integer;
S1, S2: string;
begin
ItemIdx := -1;
ArrIn := ReadArray(_data_Array);
if (ArrIn = nil) or (ArrIn._Count = 0) then exit;
idx := ReadInteger(_Data, _data_Index, _prop_Index);
if idx < 0 then exit;
S1 := ReadString(_Data, _data_Value, Share.ToString(_prop_Value));
if not _prop_CaseSensitive then S1 := AnsiLowerCase(S1);
for i := idx to ArrIn._Count - 1 do
begin
S2 := Share.ToString(GetArrayVal(i));
if not _prop_CaseSensitive then S2 := AnsiLowerCase(S2);
if (_prop_Partial and (Pos(S1, S2) <> 0)) or (S1 = S2) then
begin
ItemIdx := i;
break;
end;
end;
_hi_CreateEvent(_Data, @_event_onFind, ItemIdx);
end;
Ответов: 4630
Рейтинг: 749
|
|||
Aroyl, попробуй замени процедуру THIArrayFind._work_doFind0() на эту:
|
|||
карма: 26 |
| ||
Голосовали: | Aroyl |