Re: [Lazarus] FileUtil.FindAllFiles - changes strings inside

2020-09-21 Thread Ralf Quint via lazarus
On 9/21/2020 3:16 AM, Bart via lazarus wrote: On Mon, Sep 21, 2020 at 12:19 AM AlexeyT via lazarus wrote: you see that to iterate over all items in char-separated ASearchPath, code modifies str, ie deletes parts of it. It's slow! We should not modify str here. It's easy- save old-index, new-in

Re: [Lazarus] FileUtil.FindAllFiles - changes strings inside

2020-09-21 Thread Bart via lazarus
On Mon, Sep 21, 2020 at 12:19 AM AlexeyT via lazarus wrote: > you see that to iterate over all items in char-separated ASearchPath, > code modifies str, ie deletes parts of it. It's slow! We should not > modify str here. It's easy- save old-index, new-index, and get Copy(n1, > n2-n1{+delta}). Pr

[Lazarus] FileUtil.FindAllFiles - changes strings inside

2020-09-20 Thread AlexeyT via lazarus
procedure TFileSearcher.Search(ASearchPath: String; ASearchMask: String;   ASearchSubDirs: Boolean; CaseSensitive: Boolean = False);     while ASearchPath<>'' do begin   p:=Pos(FPathSeparator,ASearchPath);   if p<1 then     p:=length(ASearchPath)+1;   Dir:=ResolveDots(LeftStr(ASea