code: public static String repeat(char ch, int repeat) {
      if (repeat <= 0) return Empty;
      char[] buf = new char[repeat];
      for (int i = repeat - 1; i >= 0; i--) {
        buf[i] = ch;
      }
      return new String(buf);
    }
docs: <p>
  Returns padding using the specified delimiter repeated to a given length.
  </p>
  
  <pre>
  repeat(0, 'e')  = ""
  repeat(3, 'e')  = "eee"
  repeat(-2, 'e') = ""
  </pre>
  
  @param ch character to repeat
  @param repeat number of times to repeat char, negative treated as zero
  @return String with repeated character
  @see #repeat(String, int)