Skip to content

StringPadRight

Pads a string on the right to a specified length.

$ wo 'StringPadRight["hi", 5, "0"]'
hi000
$ wo 'StringPadRight["hello", 3]'
hel

Given just a list of strings, each is padded to the length of the longest.

$ wo 'StringPadRight[{"a", "ab", "abc"}]'
{a  , ab , abc}