pad_tail

Definition: sequence target = pad_tail(sequence target, integer size, object ch=' ')
Description: Pad the end of a sequence with an object so as to meet a minimum length condition.

target: the sequence to pad.
size: the minimum length of the result.
ch: the object to pad with, usually a character (defaults to a space).

Returns either target if it was already long enough, or extended to be of length size by appending the required number of elements at the end.
Comments: pad_tail() does not remove characters. The target and result need not necessarily be the same.
If length(target) is greater than or equal to size, this function simply returns target unaltered.
See tail() if you wish to truncate long sequences.
Example:
s = pad_tail("ABC", 6)              -- s is "ABC   "
s = pad_tail("ABC", 6, '-')         -- s is "ABC---"