|
@@ -1225,9 +1225,12 @@ begin
|
|
|
begin
|
|
|
T:=SubString(LastSep);
|
|
|
// Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
|
|
|
- MaybeGrow(Len);
|
|
|
- Result[Len]:=T;
|
|
|
- Inc(Len);
|
|
|
+ If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
|
|
|
+ begin
|
|
|
+ MaybeGrow(Len);
|
|
|
+ Result[Len]:=T;
|
|
|
+ Inc(Len);
|
|
|
+ end;
|
|
|
end;
|
|
|
SetLength(Result,Len);
|
|
|
end;
|
|
@@ -1308,9 +1311,12 @@ begin
|
|
|
begin
|
|
|
T:=SubString(LastSep);
|
|
|
// Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
|
|
|
- MaybeGrow(Len);
|
|
|
- Result[Len]:=T;
|
|
|
- Inc(Len);
|
|
|
+ If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
|
|
|
+ begin
|
|
|
+ MaybeGrow(Len);
|
|
|
+ Result[Len]:=T;
|
|
|
+ Inc(Len);
|
|
|
+ end;
|
|
|
end;
|
|
|
SetLength(Result,Len);
|
|
|
end;
|