Skip to content

StringPadLeft

Pads a string on the left to a specified length.

$ wo 'StringPadLeft["hi", 5]'
   hi
$ wo 'StringPadLeft["hi", 5, "0"]'
000hi
$ wo 'StringPadLeft["hello", 3]'
llo

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

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