IDE: fixed SearchInStringListI

git-svn-id: branches/fixes_1_6@53406 -
This commit is contained in:
mattias 2016-11-21 16:18:33 +00:00
parent 95641a8723
commit 0adf62bd62
2 changed files with 3 additions and 6 deletions

View File

@ -256,7 +256,7 @@ procedure CheckList(List: TList; TestListNil, TestDoubles, TestNils: boolean);
procedure CheckList(List: TFPList; TestListNil, TestDoubles, TestNils: boolean);
procedure CheckEmptyListCut(List1, List2: TList);
procedure RemoveDoubles(List: TStrings);
function UTF8SearchInStringList(List: TStrings; const s: string): integer;
function SearchInStringListI(List: TStrings; const s: string): integer; // search ASCII case insensitive, not UTF-8
procedure ReverseList(List: TList);
procedure ReverseList(List: TFPList);
procedure FreeListObjects(List: TList; FreeList: boolean);
@ -1280,14 +1280,11 @@ begin
end;
end;
{-------------------------------------------------------------------------------
function UTF8SearchInStringList(List: TStrings; const s: string): integer;
-------------------------------------------------------------------------------}
function UTF8SearchInStringList(List: TStrings; const s: string): integer;
function SearchInStringListI(List: TStrings; const s: string): integer;
begin
if List=nil then exit(-1);
Result:=List.Count-1;
while (Result>=0) and (UTF8CompareText(List[Result],s)<>0) do dec(Result);
while (Result>=0) and (CompareText(List[Result],s)<>0) do dec(Result);
end;
{-------------------------------------------------------------------------------

Binary file not shown.