public static String erase(String line, int from, int to) {
    return line.substring(0, from) + repeatChar(' ', to - from) + line.substring(to);
  }
Utility methods for text processing.

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