repeat function

String repeat(
  1. String source,
  2. int times
)

Implementation

String repeat(String source, int times) {
  String value = "";
  for (var i = 0; i < times; i++) {
    value += source;
  }
  return value;
}