code: static String repeat(final String toBeRepeated, final int numTimes) {
          final StringBuilder builder = new StringBuilder();
  
          for (int i = 0; i < numTimes; i++) {
              builder.append(toBeRepeated);
          }
          return builder.toString();
      }
docs: a str_repeat function.
  
  @param toBeRepeated the string to repeat
  @param numTimes     how many times to concantenate the string
  @return the repeated string.