13.12.2006, 01:43
|
|
Местный
|
|
Регистрация: 03.06.2006
Адрес: Почту найдете на моем сайте
Сообщения: 576
Версия Delphi: D10.2
Репутация: 214
|
|
Вот самый простой способ
Код:
function FileParser( Path, str: string ): boolean;
var
s: string;
f: TextFile;
begin
Result := false;
AssignFile( f, Path );
Reset( f );
while not Eof( f ) do
begin
Readln( f, s );
if Pos( str, s ) > 0 then
begin
Result := true;
Break;
end;
end;
CloseFile( f );
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
FileParser( 'c:\1.txt', 'искомая_строка' );
end;
|