Skip to content

Commit a0bccbb

Browse files
committedJun 14, 2022
[commons] new FillStrEx method
1 parent c45e315 commit a0bccbb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎Quick.Commons.pas

+8
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ EShellError = class(Exception);
330330
function ChangeDateOfADay(aDate : TDateTime; aYear, aMonth, aDay : Word) : TDateTime;
331331
//returns n times a char
332332
function FillStr(const C : Char; const Count : Integer) : string;
333+
function FillStrEx(const value : string; const Count : Integer) : string;
333334
//checks if string exists in array of string
334335
function StrInArray(const aValue : string; const aInArray : array of string; aCaseSensitive : Boolean = True) : Boolean;
335336
//checks if integer exists in array of integer
@@ -869,6 +870,13 @@ function FillStr(const C : Char; const Count : Integer) : string;
869870
for i := 1 to Count do Result := Result + C;
870871
end;
871872

873+
function FillStrEx(const value : string; const Count : Integer) : string;
874+
var
875+
i : Integer;
876+
begin
877+
Result := '';
878+
for i := 1 to Count do Result := Result + value;
879+
end;
872880

873881
function StrInArray(const aValue : string; const aInArray : array of string; aCaseSensitive : Boolean = True) : Boolean;
874882
var

0 commit comments

Comments
 (0)
Please sign in to comment.