Pads a collection of strings to a desired length to either
the left or right with a specified character.
Usage
pad.string(x, len = max(nchar(x)), padchar = " ", right = T)
Arguments
x
character object
len
desired length of the returned strings
padchar
a single-character string.
right
if TRUE (the default), the strings in x are
padded to the right, else they are padded to the left.
Value
an object like x, but with the strings padded out to the
desired length. Strings in x that are already len or more
characters long are unaffected by the function.