repeatTimes method

  1. @useResult
String repeatTimes(
  1. int n
)

Returns this string repeated n times, or empty if n <= 0.

Implementation

@useResult
String repeatTimes(int n) => n <= 0 ? '' : List<String>.filled(n, this).join();