Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!

String.pad

pad(length, padString = ' ')

Description

Expand string to length characters, by adding padString to both sides.

'willow'.pad(10);       //= '  willow  '
'willow'.pad(10, '.');  //= '..willow..'

See Also