public static StringBuilder appendTo(StringBuilder builder, int toPos, char c) {
    for (int i = builder.length(); i <= toPos; ++i) {
      builder.append(c);
    }
    return builder;
  }
Convenient utility class with static methods.
samza-sql-shell/src/main/java/org/apache/samza/sql/client/util/CliUtil.java