padRight method

String padRight(
  1. String source,
  2. int length
)

Pads source to length by adding spaces at the end.

Implementation

String padRight(final String source, final int length) => source
  + ' ' * (length - source.length);