The RightPad function returns the string S, right-justified within the output, and padded with the Ch character (on the left) if necessary, to make the output up to length of Len.
Declaration: Function RightPad( 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 := RightPad('abc','1',5); // returns '11abc' - two padding characters added, leaving S right-justified