mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
+ Add GetLineCount method to TMemoryTextFile object
git-svn-id: trunk@7418 -
This commit is contained in:
parent
ea5bc8c155
commit
2b672a5525
@ -30,7 +30,8 @@ type
|
||||
constructor Init;
|
||||
procedure AddLine(const S: string); virtual;
|
||||
function GetLine(Idx: sw_integer; var S: string): boolean; virtual;
|
||||
function GetFileName : string; virtual;
|
||||
function GetFileName : string; virtual;
|
||||
function GetLineCount : sw_integer;
|
||||
destructor Done; virtual;
|
||||
private
|
||||
Lines : PUnsortedStrCollection;
|
||||
@ -142,6 +143,11 @@ begin
|
||||
GetFileName:='unknown';
|
||||
end;
|
||||
|
||||
function TMemoryTextFile.GetLineCount : sw_integer;
|
||||
begin
|
||||
GetLineCount:=Lines^.Count;
|
||||
end;
|
||||
|
||||
procedure TMemoryTextFile.AddLine(const S: string);
|
||||
begin
|
||||
Lines^.Insert(NewStr(S));
|
||||
@ -617,7 +623,9 @@ var Found: boolean;
|
||||
InStr: boolean;
|
||||
I: sw_integer;
|
||||
begin
|
||||
Found:=false; Name:=UpcaseStr(Name);
|
||||
Found:=false;
|
||||
Name:=UpcaseStr(Name);
|
||||
Value:='';
|
||||
S:=TagParams;
|
||||
repeat
|
||||
InStr:=false;
|
||||
|
Loading…
Reference in New Issue
Block a user