public static String repeatChar(char ch, int times) {
    char[] chars = new char[times];
    Arrays.fill(chars, ch);
    return new String(chars);
  }
Utility methods for text processing.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/util/TextUtil.java