mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 10:49:29 +02:00
* Added AddEmptyStrings to ExtractStrings (bug 25633)
git-svn-id: trunk@26600 -
This commit is contained in:
parent
b023e30164
commit
b5a2b3860b
@ -625,7 +625,7 @@ end;
|
||||
* Miscellaneous procedures and functions *
|
||||
**********************************************************************}
|
||||
|
||||
function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings): Integer;
|
||||
function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings; AddEmptyStrings : Boolean = False): Integer;
|
||||
var
|
||||
b, c : pchar;
|
||||
|
||||
@ -641,12 +641,13 @@ var
|
||||
s : string;
|
||||
begin
|
||||
l := c-b;
|
||||
if l > 0 then
|
||||
if (l > 0) or AddEmptyStrings then
|
||||
begin
|
||||
if assigned(Strings) then
|
||||
begin
|
||||
setlength(s, l);
|
||||
move (b^, s[1],l);
|
||||
if l>0 then
|
||||
move (b^, s[1],l*SizeOf(char));
|
||||
Strings.Add (s);
|
||||
end;
|
||||
inc (result);
|
||||
|
@ -2141,5 +2141,5 @@ procedure ObjectTextToResource(Input, Output: TStream);
|
||||
function LineStart(Buffer, BufPos: PChar): PChar;
|
||||
procedure BinToHex(BinValue, HexValue: PChar; BinBufSize: Integer);
|
||||
function HexToBin(HexValue, BinValue: PChar; BinBufSize: Integer): Integer;
|
||||
function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings): Integer;
|
||||
function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings; AddEmptyStrings : Boolean = False): Integer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user