[Lost] Review erbeten: FilenameMatches

Andreas Freimuth ·

Kevin Wolf schrieb:

> Die Funktion war jetzt schon ein paarmal kaputt. Es wäre Zeit, daß sich jemand 
> die Funktion wirklich gründlich vornimmt und durchschaut, ob das so 
> funktionieren kann. Ich sehe im Moment kein Problem, aber wie gesagt, das 
> ging mir schon ein paarmal so.




...


>             '*':
>                 begin
>                     while pattern[i_pattern] = '*' do begin
>                         Inc(i_pattern);
>                     end;




+                     if i_pattern >= length(pattern) then begin
+                         WriteLN('Match');
+                         exit(true)
+                     end;

> 
>                     pattern := Copy(pattern, i_pattern, length(pattern));
>                     for j := i_file to length(filename) do begin




so sollte jetzt auch ein * am Ende funktionieren

--
Andreas


Antworten