repeat method

String repeat(
  1. int count
)

Repeats the string count times.

Implementation

String repeat(int count) {
  if (count <= 0) return '';
  return List.generate(count, (index) => this).join();
}