Version: v0.6.0 - 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