Version: v0.7.1 - Beta.  We welcome contributors & feedback.

String.padBoth

padBoth($length, $padString = ' ') -> string

Description

Expand string to $length characters, by adding $padString to the left and right sides.

'willow'.padBoth(10)       //= '  willow  '
'willow'.padBoth(10, '.')  //= '..willow..'

See Also