The LeftPad function returns the string S, left-justified within the output, and padded with the Ch character (on the right) if necessary, to make the output up to length of Len.
Declaration: Function LeftPad( S : string; Ch : Char; Len : Integer) : string;
Here are a few examples.
procedure OnMapEvent(var Value:Variant);
var
Str1, Str2, Str3, Str4 : string;
begin
Str1 := LeftPad('abc','1',5); // returns 'abc11' - two padding characters added, leaving S left-justified