repeatTimes method

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

Returns this string repeated n times, or empty if n <= 0. Audited: 2026-06-12 11:26 EDT

Implementation

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