function StringFromTextFile(const FileName: TFileName): string; var s: string; F: TextFile; begin Result := EmptyStr; AssignFile(F, FileName); Reset(F); try while not Eof(F) do begin ReadLn(F, S); Result := Result + S; end; finally CloseFile(F); end; end;
function StringFromFile(FileName: TFileName): string; var Liste: TStringList begin Result := EmptyStr; Liste := TStringList.Create; try Liste.LoadFromFile(FileName); Result := Liste.Text; finally Liste.Free; end; {try..finally} end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question