padRight function

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

Pads source to length by adding spaces at the end.

Implementation

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