summaryrefslogtreecommitdiff
path: root/docview/src/docdump/filestreamhelper.pas
blob: ff831a91db8cdb73c83edbcc467dd8c5a1306b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
unit filestreamhelper; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils;

type
  TFileTextStream = class(TFileStream)
  public
    procedure   WriteLn(const fmt: String; const args: array of const);
    procedure   WriteLn(const s: String);
  end;

implementation

{ TFileTextStream }

procedure TFileTextStream.WriteLn(const fmt: String; const args: array of const);
var
  temp: String;
begin
  temp := Format(fmt, args) + LineEnding;
  Write(temp[1], Length(temp));
end;

procedure TFileTextStream.WriteLn(const s: String);
begin
  self.WriteLn('%s', [s]);
end;

end.