add TStrings.strictText

This commit is contained in:
Basile Burg 2016-11-27 08:51:44 +01:00
parent f654811f37
commit f3fadfffe0
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 11 additions and 0 deletions

View File

@ -84,6 +84,11 @@ type
function normalizePath: string;
end;
TStringsHelper = class helper for TStrings
// Same as text but without the additional line terminator.
function strictText: string;
end;
(**
* TProcess with assign() 'overriden'.
*)
@ -456,6 +461,12 @@ begin
exit(TrimFilename(self));
end;
function TStringsHelper.strictText: string;
begin
result := self.Text;
setLength(result, result.length - self.LineBreak.length);
end;
procedure TProcessEx.Assign(value: TPersistent);
var
src: TProcess;